Download-Counter and comment function on one page?

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
LarsEllmauer
Posts: 115
Joined: Thu May 22, 2008 8:14 am
Location: Kerkrade/NL
Contact:

Download-Counter and comment function on one page?

Post by LarsEllmauer » Mon Jun 02, 2008 7:40 pm

The "old" forum is down at the moment, so please excuse if my question was already answered there:

I would like to use the download-counter (http://cmsimple.de/cmsimple/index.php?H ... oadcounter) and the comment function (http://cmsimple.de/cmsimple/index.php?H ... arfunktion) on one page. As soon as I add the code for the comments

Code: Select all

#>CMSimple $output= cmrequestcomment('post');#
, I receive a white page and have to take the code out offline via FTP.

Does anyone have an idea how to solve this?

Cheers,
Lars

ZiPs
Posts: 633
Joined: Thu May 22, 2008 6:17 pm
Location: Faxe, Denmark
Contact:

Re: Download-Counter and comment function on one page?

Post by ZiPs » Mon Jun 02, 2008 7:55 pm

Have you changed the > to < in the code

Code: Select all

#>CMSimple $output= cmrequestcomment('post');#
to
#<CMSimple $output= cmrequestcomment('post');#
Preben Dahl | Webmaster cmsimple.dk | Projekt-og domæne ejer Gert Ebersbach

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Download-Counter and comment function on one page?

Post by Holger » Mon Jun 02, 2008 8:28 pm

Hi Lars,

the correct syntax is

Code: Select all

#CMSimple $output = cmrequestcomment('see');#
without any "<" or ">"

Holger

ZiPs
Posts: 633
Joined: Thu May 22, 2008 6:17 pm
Location: Faxe, Denmark
Contact:

Re: Download-Counter and comment function on one page?

Post by ZiPs » Mon Jun 02, 2008 8:41 pm

Yes Holger your right

müssen entfernt werden = must be removed

I must learn to read German right :oops:
Preben Dahl | Webmaster cmsimple.dk | Projekt-og domæne ejer Gert Ebersbach

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Download-Counter and comment function on one page?

Post by Holger » Mon Jun 02, 2008 8:48 pm

Hi Lars,

two more hints:
Normally, only one #CMSimple string can be used in each page- though the contents of several scripts may be merged into one script.

Normally the output of a CMSimple page stops after a plugin (or maybe some kind of script) is executed.
If so, use this code to place some content behind the script:

Code: Select all

#CMSimple $output=preg_replace("/".chr(35)."CMSimple.*".chr(35)."/", Your_Script_code_here ,$c[$s]);#

content of page goes one here...

Holger

LarsEllmauer
Posts: 115
Joined: Thu May 22, 2008 8:14 am
Location: Kerkrade/NL
Contact:

Re: Download-Counter and comment function on one page?

Post by LarsEllmauer » Tue Jun 03, 2008 4:38 am

Thanks for your answers, I will give it a try later today and let you know about the results...

Cheers,
Lars

LarsEllmauer
Posts: 115
Joined: Thu May 22, 2008 8:14 am
Location: Kerkrade/NL
Contact:

Re: Download-Counter and comment function on one page?

Post by LarsEllmauer » Tue Jun 03, 2008 7:29 pm

OK, I tried Holger's solution now, but seem to do something wrong: I filled in the code at the top of the page with the CMSimple script for the comment included. Afterwards the content and at the bottom the script for the download counter. When I switch back to layout view and save the code at the top is beeing removed automatically, so no way to insert this online.

I will try now to put in the code offline in an editor and see what happens then...

Correct me please if I misunderstood you... thanks! :D

manu
Posts: 1091
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Download-Counter and comment function on one page?

Post by manu » Wed Jun 04, 2008 12:11 pm

Look here: http://www.cmsimple.dk/forum/viewtopic. ... df9#p29951
That's my way to do it. Perhaps we find a generally supported solution which finds the way to "tips & tricks" in cmsimplewiki.com.
manu

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Download-Counter and comment function on one page?

Post by Holger » Wed Jun 04, 2008 4:46 pm

emanuel37 wrote: Blabla
#PLUG1#
Blabla
#PLUG2#
#CMSimple $output= preg_replace("/".chr(35)."PLUG1".chr(35)."/",gallery('images'),$c[$s]);$output= preg_replace("/".chr(35)."PLUG2".chr(35)."/",sblog("comment"),$output);#
Yes manu,
that's IMHO the only way to run more than one script on a single page.
myself wrote:...several scripts may be merged into one script
Holger

Post Reply