Textpattern CMS support forum

You are not logged in. Register | Login | Help

#41 2005-05-06 02:18:52

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: [plugin] [ORPHAN] zem_link

okay.. so i tried this out.. and i’m still seeing double titles.. am i the only one? could it be another plugin?


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#42 2005-05-06 19:50:46

Etz Haim
Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: [plugin] [ORPHAN] zem_link

alicson: Are these permlinks generated by the standard tag? I’ve found out that these are affected as well.

Offline

#43 2005-05-06 19:58:50

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,487
Website

Re: [plugin] [ORPHAN] zem_link

I couldn’t find $url_mode in the source files (any more), but urlmode is still there.
My solution was to add the line
<code>$url_mode=urlmode;</code>
just beneath the global definitions at the beginning of the function.

Not sure if it’s any better or worse than other solutions but it works for me…


TXP Builders – finely-crafted code, design and txp

Offline

#44 2005-05-06 20:05:33

Etz Haim
Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: [plugin] [ORPHAN] zem_link

jakob: No, you were not supposed to edit any source code at all. In the txp_prefs table in the MySQL database, You have to change the url_mode value from 1 to 0. In order to this, you have to use a tool like phpMyAdmin.

Offline

#45 2005-05-07 00:00:32

alicson
Member
Registered: 2004-05-26
Posts: 465
Website

Re: [plugin] [ORPHAN] zem_link

generated by the standard tag, i believe…
but i hesitate to change the urlmode in database, because as you say it would likely affect other plugins. might this not be fixed soon in an upcoming RC3 revision? :hopeful:


textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation

Offline

#46 2005-05-12 05:37:34

wazdog
Plugin Author
From: Japan
Registered: 2004-05-26
Posts: 11

Re: [plugin] [ORPHAN] zem_link

Couple of quick changes to fix all these article permlink problems. (It’s great that there are finally functions to return a permlink, without the plugin having to worry about the mode. Now we just need to get all these plugins updated!)

Around line 24 or so, comment out the first line, and add the second:

<code> //$url = ($url_mode==1 ? $thisarticle[“permlink”].$url_title : $thisarticle[“permlink”]); $url = permlinkurl($thisarticle);
</code>
<br />

And around line 33 or so, comment out the first two lines, and add the third:

<code> //$url = formatPermLink($href, $rs[“section”]); //if ($url_mode==1) $url = $url . (empty($rs[“url_title”]) ? stripSpace($rs[“Title”]) : //$rs[“url_title”]); $url = permlinkurl_id($href);
</code>

<br />
Also, as mentioned above, around line 50 or so, you may want to do this in case you have quote marks in your article titles:

<code> //$title = ($title ? “ title=\”$title\”“ : “”); $title = ($title ? “ title=\”“.htmlentities($title).”\”“ : “”);
</code>

Last edited by wazdog (2005-05-12 05:38:52)

Offline

#47 2005-05-13 12:56:36

edburdo
Member
Registered: 2004-09-20
Posts: 79
Website

Re: [plugin] [ORPHAN] zem_link

Etz, I changed the URL mode on my site (only use one plugin that generates URL’s) and everything is working OK now. Thanx…


Eric

Offline

#48 2005-05-14 15:26:26

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] zem_link

wazdog, when I do exactly as you say (at least I think I do), I get this error:

Parse error: parse error, unexpected ‘:’ in /home/httpd/vhosts/doggiez.nl/httpdocs/textpattern/lib/txplib_misc.php(351) : eval()’d code on line 26

Offline

#49 2005-05-20 03:25:17

obeewan
Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: [plugin] [ORPHAN] zem_link

wazdog,
Big up for the help that I needed when I am moving my site to RC3 (and dependent on this plugin).

Cheers!


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#50 2005-05-20 03:43:59

Etz Haim
Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: [plugin] [ORPHAN] zem_link

doggiez: Probably the line:

if ($url_mode==1) $url = $url . (empty($rs["url_title"]) ? stripSpace($rs["Title"]) : //$rs["url_title"]);

splits in two, and only the first half of it is commented. Delete the newline or comment the second half.

Offline

Board footer

Powered by FluxBB