Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] zem_nav
How is this different than the built in tags then if it isn’t category aware?
Refresh Dallas and other Refreshing Cities.
Offline
Re: [plugin] [ORPHAN] zem_nav
I think it IS category aware if you use it properly, which we obviously aren’t!
Can anyone help on this one?
Offline
Re: [plugin] [ORPHAN] zem_nav
I don’t see how it could be used improperly you just use it in place of link_to_next and link_to_prev with attributes usecat and usesec to force it to ignore categories and sections.
Time to learn php so I can fix this myself.
Refresh Dallas and other Refreshing Cities.
Offline
#28 2005-11-17 15:53:30
- grad
- Member
- From: Poznan, Poland
- Registered: 2005-10-04
- Posts: 24
Re: [plugin] [ORPHAN] zem_nav
pieman wrote:
I think it IS category aware if you use it properly, which we obviously aren’t!
Can anyone help on this one?
No, it’s not. It can’t use a single category thus it selects articles belonging to any category. I temporarily fixed it by changing the code to use the category I wanted.
Offline
Re: [plugin] [ORPHAN] zem_nav
grad, can you post those changes so I can do the same?
Refresh Dallas and other Refreshing Cities.
Offline
#30 2005-11-17 17:15:47
- grad
- Member
- From: Poznan, Poland
- Registered: 2005-10-04
- Posts: 24
Re: [plugin] [ORPHAN] zem_nav
Here it goes.
I modified the script with this stamp:
Line 1: # $Id: zem_nav.php,v 1.7 2005/01/13 08:12:24 zem Exp $
At lines 61 and 90 find this code:
if ($usecat) $category = empty($c) ? '' : $c;
Comment them out (put //
on beginnig of the line) so you could come back to them in case you change your mind and below add this line of code:
if ($usecat) $category = empty($thisarticle['category1']) ? $c : $thisarticle['category1'];
You have to add this code in for each of the two lines you comment out! Of course replace category1
with category2
depending on which category you want the link to stick to.
It’s not how it should be made but I didn’t bother to modify the plugin code. Besides, I’m not a programmer. At least not at the moment :)
Good luck.
Offline
Re: [plugin] [ORPHAN] zem_nav
Thanks, it works perfectly. Would you know how to modify it so that it doesn’t require the zem_link plugin? It seems that this line is what is causing the requirement for zem_link. <code>return formatHref($pfr, $link[‘section’], $link[‘thisid’], parse($thing), $t);</code>
Refresh Dallas and other Refreshing Cities.
Offline
Re: [plugin] [ORPHAN] zem_nav
Grad, if it doesn’t enable you to make it category aware then why are there usecat attributes?
And if you are right, in what way is it different from using the default tags?
Offline
#33 2005-11-17 20:13:19
- grad
- Member
- From: Poznan, Poland
- Registered: 2005-10-04
- Posts: 24
Re: [plugin] [ORPHAN] zem_nav
tinyfly, it should be feasible to get rid of zem_link. However, as I mentioned before I’m not a programmer, I’m learning PHP right now and figured out what to change to make the plugin work my way. Actually, I gave up Textpattern mainly because of it’s inability to structure the site using sections. The problem here is related to this issue. More discussion on that you can find in subsections.
I read your request because I didn’t yet unsubscribe from this forum :).
Grad, if it doesn’t enable you to make it category aware then why are there usecat attributes?
And if you are right, in what way is it different from using the default tags?
As far as I’ve figured it, this plugin is aware of categories within a section. That’s the difference when compared to default tags which don’t care about the section a given article belongs to. If you switch ‘usesec’ to off it will behave exactly the same as default tags.
Last edited by grad (2005-11-17 20:14:35)
Offline
Re: [plugin] [ORPHAN] zem_nav
Well thanks grad, I know the whole sections thing is a big issue around here. It should work without zem_link however when I disable it I get the following error: <code>Fatal error: Call to undefined function formatHref() in D:\dev\sites\cdhc-dev\public_html\txp\textpattern\lib\txplib_misc.php(455) : eval()’d code on line 35</code>
Refresh Dallas and other Refreshing Cities.
Offline
#35 2007-01-02 11:38:41
- minimal design
- Member
- Registered: 2006-10-15
- Posts: 38
Re: [plugin] [ORPHAN] zem_nav
Since the posts on this thread seem kinda old, I’m just wondering if this plug-in is supposed to work out of the box with TxP 4.0.4 or if there’s an alternate solution to get next/prev to work within categories that people use.
I get this error if I just simply install/use without any tweaks:
Fatal error: Call to undefined function: formathref() in /home/minimald/public_html/textpattern/lib/txplib_misc.php(512) : eval()'d code on line 36
Thanks!
Offline
#36 2008-03-03 15:12:20
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: [plugin] [ORPHAN] zem_nav
hello zem,
I have this page :
<code>
<txp:if_section name=”“>
<txp:article_custom section=“voorpagina” form=“default” />
</txp:if_section>
<txp:if_section name=“article”>
<txp:upm_date_archive section=“article” include_date=“yes” date_format=”%e %B” mode=“smart” form=“dagboek” />
</txp:if_section>
<txp:if_section name=”,article”>
<txp:else />
<txp:article /><!— this is for other sections than the front page or ‘article’ —>
</txp:if_section>
</code>
And then dagboek looks like this :
<code>
<div class=“date_box”>
<div class=“date_box_month”><txp:posted format=”%B” /></div>
<div class=“date_box_day”><txp:posted format= “%d” /></div>
</div>
<h3 class=“entry-title”><txp:title /></h3>
<div class=“entry-content”>
<txp:body />
<txp:zem_link_to_next>Volgende</txp:zem_link_to_next>
</div>
</code>
But no prev and no next is seen here ?
What went wrong here ?
Roelof
Offline