Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#76 2005-09-17 13:22:43

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 125

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

I should have pick it – this is related to the <code>$pfr</code> issue mentioned earlier in the thread.

I fixed it by by-passing <code>$pfr</code> and using <code>hu</code> instead:

The line <code>$linkref = ‘ href=”’.$pfr.$sect.’”’;</code>

goes to <code>$linkref = ‘ href=”’.hu.$sect.’”’;</code>

This works with my install of 4.01.

SH

Last edited by Vitruvius (2005-09-17 13:24:12)

Offline

#77 2005-10-14 16:48:07

wondermonkey
New Member
Registered: 2005-06-05
Posts: 5

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Okay, kinda an emergency here, but I noticed I was getting that error related to the global variable that was discussed earlier. So, I thought I’d uninstall the plugin and reinstall it (my host was having problems earlier, and didn’t know if it was something they’d done).

When I go to reinstall it I get the following error:

Notice: unserialize(): Argument is not a string in /home/arianete/public_html/textpattern/include/txp_plugin.php on line 152

Badly formed or empty plugin code

Thus, it’s not installing… PLEASE HELP

Offline

#78 2005-10-14 17:29:54

rdtietjen
Archived Plugin Author
Registered: 2005-03-04
Posts: 31
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

http://publishingpipelines.com/rdt_dynamenus.php returns a webpage full of encoded PHP plugin code. you’re supposed to select all, copy and then paste into the plugin textarea. other than that, i don’t know.


TV? Buglight for humans.

Offline

#79 2005-10-14 17:46:34

wondermonkey
New Member
Registered: 2005-06-05
Posts: 5

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Um, shit, that’s what I’m doing. If you don’t know, then… what can I do?

Have you tried installing it with 4.0.1 yet? Can you test that?

Last edited by wondermonkey (2005-10-14 17:47:39)

Offline

#80 2005-10-14 20:24:10

rdtietjen
Archived Plugin Author
Registered: 2005-03-04
Posts: 31
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

> wondermonkey wrote:

> Um, shit, that’s what I’m doing. If you don’t know, then… what can I do?

Have you tried installing it with 4.0.1 yet? Can you test that?

I just tried it successfully, without your serialize error.
Textpattern version: 4.0.1 (r888)

sorry.


TV? Buglight for humans.

Offline

#81 2005-10-16 00:29:36

wondermonkey
New Member
Registered: 2005-06-05
Posts: 5

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Hmmm, damn. Will try it again tomorrow.

Wish me luck…

Offline

#82 2005-10-16 01:20:20

Infi
Member
Registered: 2005-05-28
Posts: 75

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Vitrius -
I fixed [the empty home link] by by-passing $pfr and using hu instead:
The line $linkref = ‘ href=”’.$pfr.$sect.’”’;
goes to $linkref = ‘ href=”’.hu.$sect.’”’;

Thanks for that. Worked for me, too.

Offline

#83 2005-10-16 03:03:40

rdtietjen
Archived Plugin Author
Registered: 2005-03-04
Posts: 31
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

> Infi wrote:

> bq. Vitrius -
I fixed [the empty home link] by by-passing $pfr and using hu instead:
The line $linkref = ‘ href=”’.$pfr.$sect.’”’;
goes to $linkref = ‘ href=”’.hu.$sect.’”’;

Thanks for that. Worked for me, too.

screw it, i’ll change version .8 to just hu, unless consensus preference is for rhu which is less verbose.


TV? Buglight for humans.

Offline

#84 2005-10-16 05:07:09

Infi
Member
Registered: 2005-05-28
Posts: 75

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

? (Haven’t followed the whole thread.) That little temp fix corrected the empty home link issue, though.

Thanks for a great plugin. It’s perfect for top-level menus. :)

Offline

#85 2005-10-17 15:28:38

wondermonkey
New Member
Registered: 2005-06-05
Posts: 5

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Hey, I’m still getting the following when trying to install:
Notice: unserialize(): Argument is not a string in /home/arianete/public_html/textpattern/include/txp_plugin.php on line 152

Can you send me the original PHP and I’ll just fudge it in myself? Would that be possible?
PLEASE & thanks.

Last edited by wondermonkey (2005-10-18 14:04:28)

Offline

#86 2005-10-18 14:08:07

wondermonkey
New Member
Registered: 2005-06-05
Posts: 5

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Okay, so I fudged it in. Multiple /textpattern/ dir uploads, downgrading to RC3, then back, discussions with host, playing with the PHP, swapping PHP with other plugins…
and what seemed to work (honestly I can’t remember at this point) was to take out the <?php & ?> tags. If it was something else my brain didn’t make the correlation.

Anyway, a smaller problem now, would be why this:
txp:rdt_article_menu wraptag=“ul” break=“li” class=“subnav” active=“active” id=“articles” limit=“25” sortby=“Posted” sortdir=“desc” dateposted=“to_date” section=”“ status=“live” />

Is creating HTML like this:

ularticles class=‘subnav’>
li>
a href=‘http://www.arianetech.es/Product-Design/market-studies’>Market Studies
/a>
/li>
/ul>

(I’ve replaced the < with a linebreak as I can’t figure out how to paste in code without it rendering yet)

Notice the first line with the <ul> tag (parses as “ularticles class=‘subnav’ without the “id=”) . Obviously it’s not rendering properly. So far I haven’t found where you parse the UL tag in there. Any help you can offer here?

Ps. Thanks so much for sending me the raw code yesterday!

Last edited by wondermonkey (2005-10-18 14:44:51)

Offline

#87 2005-10-18 15:39:38

rdtietjen
Archived Plugin Author
Registered: 2005-03-04
Posts: 31
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

> wondermonkey wrote:

> Okay, so I fudged it in. Multiple /textpattern/ dir uploads, downgrading to RC3, then back, discussions with host, playing with the PHP, swapping PHP with other plugins…
and what seemed to work (honestly I can’t remember at this point) was to take out the <code><?php & ?> </code>
tags. If it was something else my brain didn’t make the correlation.

huh. i hope you removed all the plugin template apparatus and just used the function definitions in the middle.

> (I’ve replaced the < with a linebreak as I can’t figure out how to paste in code without it rendering yet)

use the forum’s code, /code tags

I just used the tag() function provided by textpattern, did you figger that out?

<code> // return UL list: $id = (!empty($id)) ? ‘ id=”’.$id.’”’ : ‘’; $class = (!empty($class)) ? “ class=’$class’” : ‘’; return tag(implode(“\n”, $out),$wraptag,$id.$class); }
</code>


TV? Buglight for humans.

Offline

#88 2005-10-24 22:20:36

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

Mmmmm… this seems to be a powerful plug-in… I’m installing it right now. I have no doubts that I’m needing a plug-in like this one.

But, in the meanwhile, I have found (looking at the plug-in help and also at the plug-in code) that this plug-in doesnt support <code>status=“sticky”</code>…
Setting articles to “sticky” is more meaningful when you are creating statics websites.

Can this be added in the next version?

I think the support for status=“sticky” will make this plug-in even more powerful and will improve the flexibility of TXP for managing statics sites.

Example:

You can have a section that have both dynamic and static articles.
In that section, you could need a subnav menu (where menu items are generated from the titles of articles saved as “sticky”) and also need a dynamic article list (where the list is generated from articles published as “live”).
So, you can have a section where “sticky” articles can be seen as simple “subsections” and where you can also publish fresh new posts.
So, applying this to a “recipe” section.

Section:
“Recipes”

Subnav menu generated from static “sticky” articles:
<ul><li><a href=”/”>About my recipes</a></li><li><a href=”/”>My grandma’s cooking secrets</a></li><li><a href=”/”>How to extinguish a fire</a></li><li><a href=”/”>Disclaimer (¿?)</a></li></ul>

Article (recipes) list, created from last “live” articles added :
<ul><li><a href=”/”>Mistery Meat (25/10/05)</a></li><li><a href=”/”>Magic Brownies (15/8/05)</a></li><li><a href=”/”>Bitter Birthday Cake (10/8/05)</a></li></ul>

Well, to conclude: <strong>please, add support for “sticky” articles.</strong>

Thanks in advance <small>and excuse my english</small>

Last edited by maniqui (2005-10-24 22:28:38)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#89 2005-10-24 22:26:46

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

I would say the change to support “sticky” status is near here:
<pre>
<code> // Status $statmap = array(‘draft’ => 1, ‘hidden’ => 2, ‘pending’ => 3, ‘live’ => 4); foreach (explode(‘,’, $status) as $stat) { if (array_key_exists($stat, $statmap)) { $statparts[] = ‘ Status = ‘ . $statmap[strtolower($stat)]; } } $status = isset($statparts) ? ‘(’ . join(’ OR ‘, $statparts) . ‘)’ : ‘ status = 4 ‘;
</code>
</pre>

First, I would look at this line:
<pre>
<code> // Status $statmap = array(‘draft’ => 1, ‘hidden’ => 2, ‘pending’ => 3, ‘live’ => 4);
</code>
</pre>

And change it to this:
<pre>
<code> // Status $statmap = array(‘draft’ => 1, ‘hidden’ => 2, ‘pending’ => 3, ‘live’ => 4, ‘sticky’ => 5);
</code>
</pre>

But then, we also have this line:
<pre>
<code> $status = isset($statparts) ? ‘(’ . join(’ OR ‘, $statparts) . ‘)’ : ‘ status = 4 ‘;
</code>
</pre>

And I dont have any idea what to change in that line (of course, if there is the need to change something in that line).

I would appreciate any help to make this plug-in worki with “sticky” articles. Thanks.

Last edited by maniqui (2005-10-24 22:28:02)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#90 2005-10-24 23:15:17

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] rdt_dynamenus - automatic section and article menus

I’m testing this plug-in (while waiting the support for “sticky” status ;) )

I have found a little error similar to what wondermonkey posted above (post 86).

In rdt_section_menu, if you use <code>class=”“</code> to override the plug-in default value, the output has an error:
<code><ul id=“primario“acerca-nuestro></code> (it’s bad formed)
where I was specting something like:
<code><ul id=“primario” class=“acerca-nuestro”></code>.

If I dont specify a value for class attribute, I get:
<code><ul id=“primario” class=“menu acerca-nuestro”></code> (I can live with that, no problem)

But I have noticed that each <code><li></code> gets an ID applied, and it doesnt seems to be configurable using the plug-in’s attributes.
I get
<code><li id=“menu_acerca-nuestro”>…blabla….</li>
<li id=“menu_noticias”>….blabla…</li>
</code>

It seems that the user dont have control over the ID applied to each <code><li></code>, or at least, I didnt found how to (i would like no-ID applied to li tag, just the class=“active” to the active one).
Of course, for me, that ID doesnt means any problem but they are few bits in the output that I dont need.

Finally, I cant get working the “default” attribute.
I add <code>default=“portada”</code> to the plug-in tag, but I dont get a link to the home that reads “Portada”.
I just get nothing.

This is a great plug-in that seems to need a few little adjust to work flawlessly.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB