Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

#49 2005-05-12 12:17:16

phux
New Member
From: Münster
Registered: 2005-04-26
Posts: 7
Website

Re: [archived] sdr_guestbook

jo that was the problem… thx for the hint :)

Last (hopefully…) problem:
When i have more than one page the pagestring contains a link ( $pagestring .= “<a href=/$s/?page=”.($page-1).”>«</a> “; )
How can i make the href valid?
I get warnings because of the two “/“s in the url.

Doggiez, you got you page completely valid. Did you have the same problem with the links?

greetins…

Last edited by phux (2005-05-12 13:37:44)

Offline

#50 2005-05-12 14:11:31

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

Re: [archived] sdr_guestbook

Yes, I solved that only yesterday, took me some time to figure it out…
This is my code:

<code> $space = “&nbsp;”; $pagestring =”<h5>”;

// previous link if ($page>1) { $pagestring .= “<a href=\”/”.$s.”/?page=”.($page-1).”\”>&laquo;</a>”.$space.$space.”\n”; } // next link if ($page<$pagenums) { $pagestring .= “<a href=\”/”.$s.”/?page=”.($page+1).”\”>&raquo;</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;”; } } $pagestring .=’</h5>’; // end comments paging </code>

Sorry, I don’t know how to keep the line breaks in the code, just find for ‘previous link’, ‘next link’ and ‘dynamic page number links’ the <code><a href…></code> part.
(The <code><h5></code> is mine, I don’t think it was in the original code, so don’t copy that.)

Edit: if you click ‘Quote’ you can see the code as I pasted it in.

Last edited by doggiez (2005-05-12 14:16:23)

Offline

#51 2005-05-12 19:14:04

phux
New Member
From: Münster
Registered: 2005-04-26
Posts: 7
Website

Re: [archived] sdr_guestbook

One design tip for you page:
Put the “next page” arrows on the right side of the pagenumbers. That looks better, imo.

Ah you put the /s in “”… i should have guessed that, too :)

thx again

Offline

#52 2005-05-12 21:44:41

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

Re: [archived] sdr_guestbook

> phux wrote:

> One design tip for you page:
Put the “next page” arrows on the right side of the pagenumbers. That looks better, imo.

Thanks, done :)

Offline

#53 2005-06-04 15:20:11

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

Re: [archived] sdr_guestbook

Does this great plugin also works with RC3? Thnx


Regards,

Joey

Offline

#54 2005-06-04 15:43:50

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

Re: [archived] sdr_guestbook

I’m still using it at r395 and as far as I know everything is still working


Stuart

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

Offline

#55 2005-06-04 21:31:23

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

Re: [archived] sdr_guestbook

Wow, this is a great plugin :-), but I’ve a problem with validating when I use the guestbook. The validator says this:

Line 56, column 14: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

It’s because there are no “-signs wrapping the id of the ul’s. How can I solve this, I tried to change some code in the plugin, but I can’t get it working.

Regards,
Joey


Regards,

Joey

Offline

#56 2005-06-04 21:43:44

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [archived] sdr_guestbook

Stuart, did you have to hack the code to get your guest book to look like that? Does your gb ask new guests for their email address?How do you make it so the email address isn’t linked to the guest name in the guest entry?

Cheers
Lee

Offline

#57 2005-06-04 21:44:49

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

Re: [archived] sdr_guestbook

Joey, I solved this by applying a few changes to the plugin code. Have a look at the last posts on page 2 of this thread, it’s explained there.

Offline

#58 2005-06-04 21:50:04

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

Re: [archived] sdr_guestbook

Lee, I think it’s because in admin_config.php email addresses in comments are set to never be displayed. My guestbook handles email addresses the same way as Stuart’s.

Offline

#59 2005-06-04 22:34:48

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

Re: [archived] sdr_guestbook

Thnx doggiez…I see

Okay, I maked the change, and the problem is now solved for the links, but not for the ul id. How do I solve that? I can’t get it working with my php knowledge.

Last edited by JoeyNL (2005-06-04 22:44:33)


Regards,

Joey

Offline

#60 2005-06-04 22:59:22

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

Re: [archived] sdr_guestbook

No hacks for me. Email address is as doggiez says, you need to set it in /lib/admin_config.php and it will apply sitewide. If there’s anything else specific just ask.


Stuart

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

Offline

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

Board footer

Powered by FluxBB