Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] sdr_guestbook

#61 2005-06-04 23:16:48

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

JoeyNL, it might be this:

In function sdr_discuss find this line:

<code>$commentsul = (!empty($commentsul)) ? ‘id=’.$commentsul : “”;</code>
<br />
What I have in my code is this:
<br />
<code>$commentsul = (!empty($commentsul)) ? ‘id=”’.$commentsul : ‘”’;</code>
<br />
and my page validates, so that’s probably what you have to change.

(Please let me know if I’m talking sense here, I wouldn’t know…)

Offline

#62 2005-06-05 07:37:58

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 257

Re: [archived] sdr_guestbook

> doggiez wrote:

> <code>$commentsul = (!empty($commentsul)) ? ‘id=”’.$commentsul : ‘”’;</code>

Okay, I did that, but is still isn’t closing my tag and then, of course, it does not validate.
Its still outputting: < ul id=“gastcom>

Last edited by JoeyNL (2005-06-05 07:56:10)


Regards,

Joey

Offline

#63 2005-06-05 12:12:02

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

> JoeyNL wrote:

> Okay, I did that, but is still isn’t closing my tag and then, of course, it does not validate.
Its still outputting: < ul id=“gastcom>

Sorry, you’re right. I’m not good with quotes. And I had not noticed because I didn’t use the commentsul.
I solved it by hardcoding the commentsul, I changed

<code>$out.= “<br /><ul $commentsul>\n”;</code>

(mind that the original code is <code>$out.= “<br />$pagestring<ul $commentsul>\n”;</code> but I moved the paging)

into

<code>$out.= ‘<br /><ul id=“yourcommentsulid”>’;</code>

Offline

#64 2005-06-05 15:24:32

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: [archived] sdr_guestbook

I think all the paging links are knackered as well doggiez. They are all missing the “quotes” in the href.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#65 2005-06-05 15:35:27

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

Stuart,
Yes I know. I did something to the code for paging as well, some time ago, and the problem is I don’t remember (or even understand) what I did. But my page validates, so if you want my code let me know.

Offline

#66 2005-06-05 15:49:55

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 257

Re: [archived] sdr_guestbook

Wow…my page finally validates :) thnx.

Last question: how can I change the Next/Previous buttons? So the next button is on the right side?


Regards,

Joey

Offline

#67 2005-06-05 15:59:36

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

If I remember well, I changed the order in the code for paging. So now I have this order:

// previous link
…code…

// dynamic page number links
…code…

// next link
…code…

Offline

#68 2005-06-05 16:05:20

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 257

Re: [archived] sdr_guestbook

Hmm on second thought editing this plugin is quite easy ;-)


Regards,

Joey

Offline

#69 2005-06-11 18:07:15

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,192
Website GitHub

Re: [archived] sdr_guestbook

Slight adjustment to the code above provides quotes around the communtsul and pageul

approx line 12 <code> $pageul = (!empty($pageul)) ? ‘id=”’.$pageul.’”’ : “”;</code>

approx line 159: <code> $commentsul = (!empty($commentsul)) ? ‘id=”’.$commentsul.’”’ : “”; </code>


TXP Builders – finely-crafted code, design and txp

Offline

#70 2005-06-11 18:25:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

Thank you!!

Offline

#71 2005-06-12 10:29:26

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,192
Website GitHub

Re: [archived] sdr_guestbook

No problem doggiez. I borrowed your mod too and made one modification to your code so that the page numbering only shows up if more than one page exists to avoid a stray “1” hanging around.

I just wrapped all your code in an if statement i.e. additions to first and last line.

<pre><code> $space = “&nbsp;”;

if ($pagenums>1) { // show page numbering only if more than one page exists

$pagestring =”<h5>”; // previous link if ($page>1) { $pagestring .= “<a href=\”/”.$s.”/?page=”.($page-1).”\”>&laquo;</a>”.$space.$space.”\n”; } // dynamic page number links for ($i=1; $i<=$pagenums; $i++) { if ($i!=$page) { $pagestring .= “<a href=\”/”.$s.”/?page=$i\”>$i</a>&nbsp;&nbsp;”; } else { $pagestring .= “<strong>$i</strong>&nbsp;&nbsp;”; } } // next link if ($page<$pagenums) { $pagestring .= “<a href=\”/”.$s.”/?page=”.($page+1).”\”>&raquo;</a>”.$space.$space.”\n”; } $pagestring .=’</h5>’; // end comments paging

} // end page numbering only if more than one page
</code></pre>

Last edited by jakob (2005-06-12 10:33:11)


TXP Builders – finely-crafted code, design and txp

Offline

#72 2005-06-12 10:54:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [archived] sdr_guestbook

Wow, perfect! On my own site in the meantime I did reach page 2 :) but I can sure use this on other sites.

Thanks!

Offline

#73 2005-06-17 23:20:35

BlueMaex
New Member
Registered: 2005-02-20
Posts: 2

Re: [archived] sdr_guestbook

i have also this plugin up and running. Its works fine in rc3 yes but it is showing some strange dates.
When i choose in the Admin the date option hrs/days ago everything works fine, but when i chose any other options it produces me output like this:
%+0200e %666, %16:%May

Do somebody know how can i fix this?

UPDATE:
Ok i found it, RC3 is handling the date format differently. Just edit the plugin around line 229 in the function sdr_formatComments()
change the line $comment_time = date($comments_dateformat,($time + $timeoffset));
to $comment_time = safe_strftime($comments_dateformat,$time);

Then it works like a charm again :-)

Last edited by BlueMaex (2005-06-17 23:40:23)

Offline

#74 2005-07-23 00:07:40

danbanG
New Member
Registered: 2005-07-19
Posts: 2

Re: [archived] sdr_guestbook

hi together =)

thanks for this great plugin …

but i have two minor problems:
first of all have a look – <a href=“http://www.unterstrich.de/schrittweise/index.php?s=guestbook” title=“guestbook”>guestbook</a>

- problem nr.1:
the LINKS: NEXT – 1 2 3 dont work … the link is wrong, but i absolutly could not find out how to fix it (i am using messy urls)
<br />
- problem nr 2:
at the top of the guestbook page you will find the headline “guestbook” – under that headline u can see in a small fontsize “- Kommentar” – how can i get rid of that?
<br />
thanks =)

bb

Last edited by danbanG (2005-07-23 00:09:12)

Offline

#75 2005-07-26 14:11:51

TextDude
New Member
Registered: 2005-07-26
Posts: 3

Re: [archived] sdr_guestbook

Hi!

I installed the plugin, created a section “guestbook” and posted an article.
When I put …

sdr_guestbook section=“guestbook” pagelimit=“10” articletitle=“Guestbook”

… into the message body, I get a 500 Internal Server Error. When I leave the
text out, TXP works again. I can preview the comment but comments are not
added to the page.

Is there any trick? http://www.igslo-abi91.de/ is the web site with the guestbook.

Thank you in advance for help!

U

Last edited by TextDude (2005-07-26 14:16:07)

Offline

  1. Index
  2. » Archives
  3. » [archived] sdr_guestbook

Board footer

Powered by FluxBB