Re-Position SHOW_CONTENT code higher up in content.func.inc.

Discuss phpwcms here, please do not post support requests, bug reports, or feature requests! Non-phpwcms questions, discussion goes in General Chat!
Post Reply
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Re-Position SHOW_CONTENT code higher up in content.func.inc.

Post by jsw_nz »

Just wanted to bring this up
- likely that Oliver would like to consider this
- had a situation where I wanted to have footer material 'update-able'
- so used the SHOW_CONTENT tag.

The contentpart itself used other
common reptags including
[BACK],[PRINT],[BOOKMARK],[TOP]
yet these were not being rendered....

Found that re-positioning the SHOW_CONTENT code
higher in the content.func.inc.php code
these tags would properly get rendered....

I moved it up to line 468 and it now works:

Code: Select all

// {SHOW_CONTENT:MODE,id[,id[,...]]}
if( ! ( strpos($content["all"],'{SHOW_CONTENT:')===false ) ) {
	$content["all"] = preg_replace('/\{SHOW_CONTENT:(.*?)\}/e', 'showSelectedContent("$1");', $content["all"]);
}
Not sure if this conflicts with other functionality - to me it seems to be OK
- so just making this a suggestion...
:)
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post by Jensensen »

Hi jsw_nz,

so far I didn't checked the code or even tried but, to change footer my spontaneous idea is to work with snippets and to include using php:

<?php require("MyFooterTemplates/footer01.tpl"); ?>


why don't use
{footer} [in combination with {SHOW_CONTENT} ] or
layout templates in combination with {SHOW_CONTENT} ??


greetz

ps: however and as described above, seems to be a remarkable discovery programmers [should] have a closer look at...
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
jsw_nz
Posts: 907
Joined: Fri 2. Apr 2004, 02:42
Location: New Zealand

Post by jsw_nz »

Hi Jensensen,

Thanks for the reply, to respond
<?php require("MyFooterTemplates/footer01.tpl"); ?>
yes, that would be good way - however I had in mind editing content directly inside wcms backend - having said that IF in the future *.tmpl could be edited directly from backend, that would be nice. Since OliG is starting to provide template options for a lot of contentparts - the idea to create means to edit them is a good one - methinks - I really particularly like the plaintext template options - create way to embed text wrapped in class-based div's - easier than wysiwyg option.
why don't use
{footer} [in combination with {SHOW_CONTENT} ] or
layout templates in combination with {SHOW_CONTENT} ??
guessing that might present the same issues I discussed - although not sure.

Anyway thanks - perhaps OliG could comment on these issues

All the best
i enjoy your posts
:)
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post by Jensensen »

[x]
Last edited by Jensensen on Sat 20. Sep 2008, 02:31, edited 3 times in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

did it - makes sense.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply