Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2008-04-24 15:27:25

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 638
Website

Re: rah_comments // Pagination for comments

thanks but now it is limit the comments,
but for some reason i don’t see the paging links anymore :/
this is my form:
<txp:if_comments_allowed>
<txp:comments_preview form="comments_fbgb_preview" />
<txp:comments_form form="comment_form_fbgb" />
<txp:rah_comments form="comments_fbgb" sort="posted desc" limit="1" />
<txp:else />
</txp:if_comments_allowed>

and that is my page’s article code:
<txp:article form="fbgb" allowoverride="0" limit="1" pgonly="0" status="4" />

they are only 3 comments in the article
I made the test before on other page, and now i’m trying it in my “guestbook” page.

Offline

#32 2008-07-30 07:56:33

oliverker
Plugin Author
From: Huddersfield
Registered: 2008-07-14
Posts: 90
Website

Re: rah_comments // Pagination for comments

hi,
I posted the ‘one million comments’ and I’m testing your lovely pluggin, but is there a way of showing the most recent comment first? If I use sort=“desc” nothing is displayed. Can you help please.

Just seen the post above this one and seen sort=“posted desc” and works perfect. Ta

Oliver

Last edited by oliverker (2008-07-30 08:00:15)

Offline

#33 2008-09-02 02:42:18

jan
Member
From: Utrecht, The Netherlands
Registered: 2006-08-31
Posts: 71
Website

Re: rah_comments // Pagination for comments

Very nice plugin!

I’ve improved one line of code so that the current page number is printed as a plain number instead of an anchor, just like the pagination in this topic.

Line 48:

$number[] = (($break_pages) ? '<'.$break_pages.'>' : '').'<a href="?pg='.$i.'">'.$i.'</a>'.(($break_pages) ? '</'.$break_pages.'>' : '');

Becomes:

$number[] = (($break_pages) ? '<'.$break_pages.'>' : '').(($pg != $i) ? '<a href="?pg='.$i.'">'.$i.'</a>' : $i).(($break_pages) ? '</'.$break_pages.'>' : '');

Furthermore, I wondered why you put in the conditional that checks if the context is an individual article… that shouldn’t matter, should it?

Anyway, thanks for your effort!


Kensington TXP powered rock

Offline

#34 2008-09-02 18:30:22

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: rah_comments // Pagination for comments

Hello,

I have one question.
I also want to use this plugin as a guestbook.

I have this in my page :

<div class=“date_box”>
<div class=“date_box_month”>Jan</div>
<div class=“date_box_day”>18</div>
</div> <txp:article /> <txp:if_comments> <txp:rah_comments wraptag=“ol” break=“li” limit=“1” /> </txp:if_article_id>
</txp:if_comments>
<txp:if_comments_allowed> <txp:comments_form form=“ask_form” />
</txp:if_comments_allowed>
</div>

For testing purposes i have made two comments.
But they appear under each other instead of on two seperate pages.

What am i doing wrong ?

Roelof

Offline

#35 2008-09-02 18:59:18

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

Re: rah_comments // Pagination for comments

I doubt if this will solve your problem, but I think that </txp:if_article_id> doesn’t belong there. If you have an opening <txp:if_article_id> somewhere before the code you posted, it still should be somewhere else, at least outside the if_comments tags, but probably at the very bottom, just before the closing </div>.

Offline

#36 2008-09-02 19:48:59

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: rah_comments // Pagination for comments

Hey Els,

I’m not using that tag anywhere.

Roelof

Offline

#37 2008-09-02 20:31:32

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

Re: rah_comments // Pagination for comments

roelof wrote:

I’m not using that tag anywhere.

Then you’d better remove it ;)

<div class="date_box">
<div class="date_box_month">Jan</div>
<div class="date_box_day">18</div>
</div>
<txp:article />
<txp:if_comments>
<txp:rah_comments wraptag="ol" break="li" limit="1" />
</txp:if_article_id> <— this one
</txp:if_comments>
<txp:if_comments_allowed>
<txp:comments_form form="ask_form" />
</txp:if_comments_allowed>
</div>

Offline

#38 2008-09-02 20:47:34

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: rah_comments // Pagination for comments

Hay Els,

I removed it but still the same problem.
But thanks for the help.

Roelof

Offline

#39 2008-09-03 05:27:17

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

roelof, could you:

  • Paste a tag trace from that unworking page.
  • Paste the path of your unworking thingy (no need for domain, only requested path, ie. section/title).

Offline

#40 2008-09-03 05:38:38

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

Furthermore, I wondered why you put in the conditional that checks if the context is an individual article… that shouldn’t matter, should it?

Two (or three) reasons:

  • Cause it is comments, and as we know, the page counting slows the page very little down.
  • Plus there were (and still are if i remember right) some comment rendering bugs when the tag is used outside individual article context.
  • Cause the current version doesn’t work on messy url mode ;)

But to say, i have new release coming up. It is ready, but the plugin repo is under updating, so it should be up tomorrow/today. Version 0.3 comes with (fixes all those issues):

  • Removed attributes: break_nav and break_pages.
  • Fixed messy url mode’s error: now works fully on messy.
  • Added attributes: pg_break, pg_break_class, prepend and append.
  • Now works in article lists, same way like <txp:comments />.
  • Better documention.

Offline

#41 2008-09-03 13:10:39

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: rah_comments // Pagination for comments

Hello Gocom,

Thank you for your help.

Here’s the tag trace.

<!— Runtime: 0.0661 —>
<!— Query time: 0.040291 —>
<!— Queries: 24 —>
<!— Memory: 3372Kb, <txp:site_url /> —>
<!— txp tag trace:
[SQL (0.003167): select name, data from txp_lang where lang=‘en-gb’ AND ( event=‘public’ OR event=‘common’)]
[SQL (0.000817): select name, code, version from txp_plugin where status = 1]
[SQL (0.000281): select ID,Section from textpattern where ID = 4 and Status >= 4 limit 1]
[SQL (0.000339): select * from txp_section where name = ‘articles’ limit 1]
[SQL (0.004004): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=4 and Status in (4,5)]
[article 4]
[SQL (0.001816): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where Posted > ’2008-09-02 19:44:46’ and Section = ‘articles’ and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000400): select ID, Title, url_title, unix_timestamp(Posted) as uposted from textpattern where Posted < ’2008-09-02 19:44:46’ and Section = ‘articles’ and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.003564): select host from txp_log where ip=‘82.75.40.237’ limit 1]
[SQL (0.000322): insert into txp_log set `time`=now(),page=’/index.php?id=4’,ip=‘82.75.40.237’,host=‘82.75.40.237’,refer=’‘,status=‘200’,method=‘GET’]
[SQL (0.000480): select user_html from txp_page where name=‘archive’]
[Page: archive]
<txp:page_title/>
<txp:site_url/>
<txp:feed_link flavor=“atom” format=“link” label=“Atom” />
<txp:feed_link flavor=“rss” format=“link” label=“RSS” />
<txp:css format=“link” />
<txp:section/>
<txp:text item=“go_content” />
<txp:text item=“go_nav” />
<txp:text item=“go_search” />
<txp:link_to_home> <txp:site_name/>
</txp:link_to_home>
<txp:site_slogan/>
<txp:section_list wraptag=“ul” break=“li” /> [SQL (0.000362): select name, title from txp_section where name != ‘default’ order by name ASC]
<txp:search_input wraptag=“p” /> [SQL (0.000264): select form from txp_form where `name` = ‘search_input’ limit 1]
<txp:feed_link label=“RSS” />
<txp:feed_link flavor=“atom” label=“Atom” />
<txp:linklist wraptag=“p” /> [SQL (0.009740): select *, unix_timestamp(date) as uDate from txp_link where 1=1 order by linksort asc ] [SQL (0.000353): select Form from txp_form where name=‘plainlinks’] [Form: plainlinks] <txp:linkdesctitle/> [Form: plainlinks] <txp:linkdesctitle/> [Form: plainlinks] <txp:linkdesctitle/>
<txp:site_url/>
<txp:if_article_list> [<txp:if_article_list>: false]
</txp:if_article_list>
<txp:article listform=“article_listing” limit=“5” /> [SQL (0.002760): select Form from txp_form where name=‘default’] [Form: default] <txp:if_individual_article> [<txp:if_individual_article>: true] <txp:permlink> <txp:title/> </txp:permlink> </txp:if_individual_article> <txp:posted/> <txp:body/> <txp:author/> [SQL (0.000203): select RealName from txp_users where `name` = ‘roelof’ limit 1] <txp:category1 title=“1” link=“1” /> [SQL (0.000188): select title from txp_category where name=‘zwangerschap’ and type=‘article’] <txp:category2 title=“1” link=“1” /> [SQL (0.000238): select title from txp_category where name=‘Category1’ and type=‘article’] <txp:comments_invite wraptag=“p” /> <txp:site_url/> [SQL (0.000297): select Form from txp_form where name=‘comments_display’] [Form: comments_display] <txp:text item=“comment” /> <txp:comments_invite textonly=“1” showalways=“1” showcount=“0” /> <txp:comments/> [SQL (0.002555): select *, unix_timestamp(posted) as time from txp_discuss where parentid=4 and visible=1 order by posted ASC ] [SQL (0.004094): select Form from txp_form where name=‘comments’] [Form: comments] <txp:comment_message/> <txp:comment_name/> <txp:comment_time/> <txp:comment_permlink> </txp:comment_permlink> [Form: comments] <txp:comment_message/> <txp:comment_name/> <txp:comment_time/> <txp:comment_permlink> </txp:comment_permlink> <txp:if_comments_preview> [<txp:if_comments_preview>: false] </txp:if_comments_preview> <txp:if_comments_allowed> [<txp:if_comments_allowed>: true] <txp:comments_form isize=“25” msgcols=“45” msgrows=“15” /> [SQL (0.002071): select ip from txp_discuss_ipban where `ip` = ’82.75.40.237’ limit 1] [SQL (0.001506): select Form from txp_form where `name` = ‘comment_form’ limit 1] <txp:comments_error wraptag=“ul” break=“li” /> <txp:text item=“comment_name” /> <txp:text item=“comment_email” /> <txp:text item=“comment_web” /> <txp:text item=“comment_message” /> <txp:comments_help/> </txp:if_comments_allowed>
<txp:if_individual_article> [<txp:if_individual_article>: true] <txp:site_url/> <txp:link_to_prev> </txp:link_to_prev> <txp:link_to_next> </txp:link_to_next>
</txp:if_individual_article>
[ ~~~ secondpass ~~~ ] —>

En here’s the path : index.php?id=4

Regards,

Roelof

Offline

#42 2008-09-03 14:11:56

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

Roelof, either I’m blind (and editors search doesn’t work) but I don’t see there any traces of rah_comments tag, only a <txp:comments /> nor a query that would even limit the comments.

Therefor, are you sure you are using the <txp:rah_comments />-tag? Cause it ain’t called according that tag trace :-)

Last edited by Gocom (2008-09-03 14:14:38)

Offline

#43 2008-09-03 15:07:03

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: rah_comments // Pagination for comments

yes, im sure,

Here a piece of the page template :

<txp:article />
<txp:if_comments>
<txp:rah_comments wraptag=“ol” break=“li” limit=“1” />
</txp:if_comments>

Roelof

Offline

#44 2008-09-03 15:13:42

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: rah_comments // Pagination for comments

Well, it’s not on that tag trace. According that tag trace your still using inbuild comments tag.

Offline

#45 2008-09-03 15:21:27

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: rah_comments // Pagination for comments

pfff, tpx can be a big puzzle.
According to what you see im a using the right piece ?

Roelof

Offline

Board footer

Powered by FluxBB