{SHOW_CONTENT} Show content of a particular content part

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
phalancs
Posts: 793
Joined: Thu 19. Feb 2004, 05:09
Location: Germany

great

Post by phalancs »

Wow, this is exactly what i have been lookin gfor these days!

Perfect!

Thanx!
2008
reverie
Posts: 3
Joined: Fri 20. Jan 2006, 17:52

argh

Post by reverie »

This rep tag hasn't been working for me and I'm not sure why. I've created the file exactly as specified and put it in frontend_render. Then I added {SHOW_CONTENT:5} to a table on my template, but when I try to see it on the page the space shows up blank.

I know I'm using the right article id because I made the content part the only one with a "top" button and that shows up just fine, just not the actual article. It's as if the code suddenly stops when it's trying to output the article...

Code in template:

Code: Select all

<td class="appendix">
{SHOW_CONTENT:5}
<br />
{SPACER:225x1}
</td>
Code that appears in the page:

Code: Select all

<td class="appendix">
<div style="margin:3px 0 0 0; padding:0 0 0 0; clear:both;"></div><div align="right"><a href="#top"><img src="img/article/top_link_0.gif" border="0" alt="" /></a></div><div style="margin:0 0 3px 0; padding:0 0 0 0; clear:both;"></div>
<br />
<img src="img/leer.gif" border="0" width="225" height="1" alt="" />
</td>
So what's going on?
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi reveri,

this RT works contentpart-sensitive. You simply must use the Contentpart-ID.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
reverie
Posts: 3
Joined: Fri 20. Jan 2006, 17:52

Post by reverie »

As I understand it, I am using the correct contentpart id (the id that is displayed beside the contentpart name when i look at a particular article).

It still doesn't display correctly.
reverie
Posts: 3
Joined: Fri 20. Jan 2006, 17:52

Post by reverie »

Is phpwcms affected by having the PHP Safe Mode on? My hosting provider is very picky and I couldn't get Mambo to work properly (couldn't upload components or modules) so I migrated over to phpcms...

Does anyone have any ideas?

Thanks.
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post by pico »

Hi

little Off-Topic in this Thread

phpWCMS runs with in Save-Mode - but some Function wich need to Create Folders are limited by this too - it has nothing to do with the CMS-System, when the Server doesn't allow Functions like this.
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
phalancs
Posts: 793
Joined: Thu 19. Feb 2004, 05:09
Location: Germany

match?

Post by phalancs »

I gues this does not match in this thread
2008
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

Hello,

while using this lovely rt I came across the following: if there is a link in the rendered cp (like [ ID 55 ]linkname[ /ID ] the link will get stripped off and I see the "[ ID 55 ]linkname[ /ID ]" as normal text (the link in the cp itself is rendered as supposed). Has anybody encountered this before or am I doing something wrong?
What can be done?

Thanks in advance
Greetings

Claus
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Re: {SHOW_CONTENT} Show content of a particular content part

Post by DeXXus »

JensZ wrote://----------------------------------------------------------------------------------------------
// {SHOW_CONTENT}
// AUTHOR: Jens Zetterström
// DESCRIPTION: Shows the content of the article content part with the specified id.
// INSTALLATION: Put the code in frontend_render (for example in a file called show_content.php)
// Note: If the article content part contains replacement tags (for example {SITE}),
// they will not be replaced because code in frontend_render is executed after those
// replacement tags already have been processed. To fix, put the code in
// content.article.inc.php instead.

// USAGE: {SHOW_CONTENT:acontent_id}
// where acontent_id is the id of the content part.
//----------------------------------------------------------------------------------------------

Cheers,

Jens
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post by update »

:oops: :oops: :oops:

edit:
thanks a lot! And when I use links like 19.56.0.0.1.0.phtml everything is ok (I wonder if this kind of link would be appropriately adapted if I move an article into another level?)
To fix, put the code in
// content.article.inc.php instead.
I'd just try to avoid too many changes in the scripts code because the next update is knocking at the door righton ;)

Greetings
claus
chip_rider
Posts: 40
Joined: Wed 2. Nov 2005, 21:41

Post by chip_rider »

Hallo Leute!

Bei mir funktioniert dieser Tag {SHOW_CONTENT:1} nicht.
Habe alles versucht:

- show_content.php im frontend_render Ordner
- code im content.article.inc.php hinzugefügt

aber nicht, nada, niente funzt...
Hat jemand eine Idee?

:cry:
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

Du denkst daran, daß es diesesmal tatsächlich die Ident-Nummer des Artikels ist... und nicht die CAT Id. (Kategorie) :idea:
chip_rider
Posts: 40
Joined: Wed 2. Nov 2005, 21:41

Post by chip_rider »

pepe wrote:Du denkst daran, daß es diesesmal tatsächlich die Ident-Nummer des Artikels ist... und nicht die CAT Id. (Kategorie) :idea:
Hallo!

Mein Stand:


PHPWCMS DEV. 1.2.6
-Artikel ID ist 23.
-In dieser Kat. ist nur dieser einzige Artikel (ID 23)
-Content Part ID des Artikels 23 ist 2
-Content Part ist auf Ausgabe {LEFT} (Wo auch mein Menu ist) eingestellt
-Im template layout (links) ist folgender Tag eingetragen {SHOW_CONTENT:23}


Die Ausgabein der HP ist immer noch der Tag selber!

...es funzt nicht... schade.... :oops:
Danke für die schnelle Antwort
pepe
Posts: 3954
Joined: Mon 19. Jan 2004, 13:46

Post by pepe »

.
.
. . . aber du hast schon in der conf.inc.php den Schalter gesetzt :idea:


$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering
chip_rider
Posts: 40
Joined: Wed 2. Nov 2005, 21:41

Post by chip_rider »

pepe wrote:.
.
. . . aber du hast schon in der conf.inc.php den Schalter gesetzt :idea:


$phpwcms["allow_ext_render"] = 1; //allow including of custom external scripts at frontend rendering

Ja! Alles ok... es war schon auf 1...
Trotzdem funzt es nicht...
ich habe den Code von {SHOW_CONTENT} im frontend rendering als show_content.php eingefügt und ich habe es auch versucht im content.article.inc.php einzufügen. Ich habe in der if(!(.....) letzten Zeilen (File: show_content.php) ein print "ich bin drin"; eingefügt um zu sehen ob er bis dort hin kommt. Nada, nichts... er kommt nicht dort hin.

Ich habe versucht ein Artikel mit Content Part (Ausgabe {left}) im template left auszugeben. Im template left habe ich schon {LEFT} eingetragen aber auch nichts. Bei mir funz irgenwie nur der tag {CONTENT} und die Tags {LEFT} {RIGHT} {HEADER} {FOOTER} nicht. Der Rest von PHPWCMS funzt einwandfrei... :)

Das Calendar Modul funktioniert perfekt. Dort wird auch der Kalender im template LEFT (Unterm NAV_Table) angezeigt. Ohne Probleme.
Post Reply