Keyword

Hi, i hope someone can edit the PHP for me!

  • James Anderson
  • James Anderson's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 2 months ago #87907 by James Anderson
Hi, i hope someone can edit the PHP for me! was created by James Anderson
Ive been trying to add an extra column to the admin side of K2. I need to add an IssueID column so when I import all my data i can see the issue it came from and then move it to the right catergory as the K2 import tool as good as it is doesnt let me insert into multiple catergories at a time. I have heaps of stories to bring across to the new site.If someone has done this, or can send me a modifed K2 admin section i would be so grateful!thanksJames

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87908 by Jiliko.net
Replied by Jiliko.net on topic Hi, i hope someone can edit the PHP for me!
Hi James,

You can override K2 (or another component) admin views by copying the view tmpl file to :
'administrator.DS.templates.DS.YOURJOOLATEMPLATE.DS.html.com_YOURCOMPONENT.DS.YOURVIEW.DS.TMPLFILE'

An example for the K2 items view in the joomla! Khepri template :

'administrator/templates/khepri/html/com_k2/items/default.php'

In attachment, a modified K2 items view that adds a 'tag' column to indicate if the item has a defined tag + lists of tags under item title.

Hope it will help you.

Olivier
www.jiliko.net

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87909 by william white
Replied by william white on topic Hi, i hope someone can edit the PHP for me!
@Olivier - There should be a rating system for posts here - * * * * *!

Please Log in or Create an account to join the conversation.

  • James Anderson
  • James Anderson's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 2 months ago #87910 by James Anderson
Replied by James Anderson on topic Hi, i hope someone can edit the PHP for me!
I got it to add an Issues column! but it is showning everything as a 0. Ive been trying to use individual I.T's import for K2 tool. It works great but i cant bring across that column for some reason? any ideas

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87911 by irish
Why is the path not 'administrator/templates/khepri/html/com_k2/views/items/default.php'

instead of: 'administrator/templates/khepri/html/com_k2/items/default.php'

Olivier Nolbert said:Hi James,
You can override K2 (or another component) admin views by copying the view tmpl file to :
'administrator.DS.templates.DS.YOURJOOLATEMPLATE.DS.html.com_YOURCOMPONENT.DS.YOURVIEW.DS.TMPLFILE'

An example for the K2 items view in the joomla! Khepri template :

'administrator/templates/khepri/html/com_k2/items/default.php'

In attachment, a modified K2 items view that adds a 'tag' column to indicate if the item has a defined tag + lists of tags under item title.

Hope it will help you.

Olivier
www.jiliko.net

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87912 by Jiliko.net
Replied by Jiliko.net on topic Hi, i hope someone can edit the PHP for me!
Hi Irish,

Because you can only override the component views templates, anything else, so no need to specify 'views'.

Olivier

irish said:Why is the path not 'administrator/templates/khepri/html/com_k2/views/items/default.php'
instead of: 'administrator/templates/khepri/html/com_k2/items/default.php'

Olivier Nolbert said:Hi James, You can override K2 (or another component) admin views by copying the view tmpl file to :
'administrator.DS.templates.DS.YOURJOOLATEMPLATE.DS.html.com_YOURCOMPONENT.DS.YOURVIEW.DS.TMPLFILE'

An example for the K2 items view in the joomla! Khepri template :

'administrator/templates/khepri/html/com_k2/items/default.php'

In attachment, a modified K2 items view that adds a 'tag' column to indicate if the item has a defined tag + lists of tags under item title.

Hope it will help you.

Olivier
www.jiliko.net

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87913 by irish
Thanks Oliver,
I have enclosed a zip with an addition to the admin interface to allow the copying of categories. I can get this to work only if the core files are edited. I cannot figure out how to overide this as you are describing in this post or am I understanding it has to be a core edit because of the views file structure not having paths for controllers, models etc....

Olivier Nolbert said:Hi Irish, Because you can only override the component views templates, anything else, so no need to specify 'views'.

Olivier

irish said:Why is the path not 'administrator/templates/khepri/html/com_k2/views/items/default.php' instead of: 'administrator/templates/khepri/html/com_k2/items/default.php'
Olivier Nolbert said:Hi James, You can override K2 (or another component) admin views by copying the view tmpl file to : 'administrator.DS.templates.DS.YOURJOOLATEMPLATE.DS.html.com_YOURCOMPONENT.DS.YOURVIEW.DS.TMPLFILE'
An example for the K2 items view in the joomla! Khepri template :

'administrator/templates/khepri/html/com_k2/items/default.php'

In attachment, a modified K2 items view that adds a 'tag' column to indicate if the item has a defined tag + lists of tags under item title.

Hope it will help you.

Olivier
www.jiliko.net
Attachments:

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87914 by Jiliko.net
Replied by Jiliko.net on topic Hi, i hope someone can edit the PHP for me!
Irish,

You're understanding well, it must be an override of the core files if you want to integrate your modifications in the K2 controller & model files.

You can also add a 'copy button' in your new view template to links to your own controller & model files that can be placed in K2 related folders...

Olivier

Please Log in or Create an account to join the conversation.

More
14 years 2 months ago #87915 by irish
Oliver,
Thanks for the speedy response. I was worried about future upgrades to k2 and the edited core files. I guess there is no other way around that...

Olivier Nolbert said:Irish,
You're understanding well, it must be an override of the core files if you want to integrate your modifications in the K2 controller & model files.

You can also add a 'copy button' in your new view template to links to your own controller & model files that can be placed in K2 related folders...

Olivier

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum