×
If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html
Pro Version - Sub Template Strips Code
- ais_web
- Topic Author
9 years 3 weeks ago #3302
by ais_web
Pro Version - Sub Template Strips Code was created by ais_web
I am having a problem where when adding code in the sub template section it stips my PHP code. I use PHP in the catalog and single view with no problems at all as I have DirectPHP installed. Can you please advise how I get PHP to work in the sub templates please?
Thanks!
Thanks!
Please Log in to join the conversation.
- Dirk
- Offline
Less
More
- Posts: 1222
- Thank you received: 225
9 years 3 weeks ago - 9 years 3 weeks ago #3303
by Dirk
Replied by Dirk on topic Pro Version - Sub Template Strips Code
Bug confirmed. Will be fixed in next version.
Meanwhile you can change line 47 in
/administrator/components/com_joodb/tables/subitem.php
Change JREQUEST_ALLOWHTML to JREQUEST_ALLOWRAW
Meanwhile you can change line 47 in
/administrator/components/com_joodb/tables/subitem.php
$o->content = JRequest::getVar("content", '', 'post', 'string', JREQUEST_ALLOWHTML);
Change JREQUEST_ALLOWHTML to JREQUEST_ALLOWRAW
Last edit: 9 years 3 weeks ago by Dirk.
The following user(s) said Thank You: ais_web
Please Log in to join the conversation.
- ais_web
- Topic Author
9 years 3 weeks ago #3304
by ais_web
Replied by ais_web on topic Pro Version - Sub Template Strips Code
That's great, thanks for your help and quick response!
Please Log in to join the conversation.
- ais_web
- Topic Author
9 years 3 weeks ago #3305
by ais_web
Replied by ais_web on topic Pro Version - Sub Template Strips Code
That change no longer strips the PHP which is great. The only problem is everything in the sub department template seems to loop, how can I insert some code which won't loop?
Thanks!
Thanks!
Please Log in to join the conversation.
- Dirk
- Offline
Less
More
- Posts: 1222
- Thank you received: 225
9 years 3 weeks ago - 9 years 3 weeks ago #3308
by Dirk
Replied by Dirk on topic Pro Version - Sub Template Strips Code
Maybe you do not understand the idea behind subtemplates.
A subtemplate shows all datasets related to the main entry.
e.g. all movies of a director
So if you have only one subentry per entry and many are displayed your linking is wrong.
Try 1:1 or n:1 Relation
Example for a n:1 relation
TABLE_MOVIES
id
movie
id_director ---> id of TABLE_DIRECTORS
A subtemplate shows all datasets related to the main entry.
e.g. all movies of a director
So if you have only one subentry per entry and many are displayed your linking is wrong.
Try 1:1 or n:1 Relation
Example for a n:1 relation
TABLE_MOVIES
id
movie
id_director ---> id of TABLE_DIRECTORS
Last edit: 9 years 3 weeks ago by Dirk.
Please Log in to join the conversation.
Moderators: Dirk, joest