Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2006-09-27 15:24:28

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: cbs_navigation_menu

I did initially try and use <code>$section</code> instead of <code>$s</code>, but it failed.

However, I just edited it back to <code>$section</code> and it works. Must have had a typo in it the first time :¬)

Offline

#17 2006-09-27 16:40:11

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: cbs_navigation_menu

On a semi side note, cbeyls, I see talk of the global <code>$s</code>. Are you aware that this has been deprecated ? Use <code>$pretext[‘s’]</code> instead (of course, you’d have to declare <code>$pretext</code> as a global obviously to get this to work).

Just thought you should know, in terms of future compatibility.


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

#18 2006-09-28 01:30:33

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

Thank you, actually I didn’t know if it was best to use $s or this strange $pretext variable. I’ll update the code of my plugins.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#19 2006-10-13 23:14:22

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

Re: cbs_navigation_menu

Hey Christophe, any way to drop the trailing / from the url output from you lovely plugin?

Like: features and not features/

Thanks, Lee

Offline

#20 2006-10-14 08:56:51

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

I’m relying on a Textpattern function to generate URL’s, so no, it’s not possible unless you change that function in the Textpattern code. I rely on that function because it generates clean or messy URL’s depending on the current configuration.

But I’m wondering why you need this since sections are made to appear like subfolders in clean URL mode and you should add a trailing slash when you’re linking to a subfolder even if it works without it.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#21 2006-10-14 09:10:24

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

Re: cbs_navigation_menu

cbeyls wrote:

But I’m wondering why you need this since sections are made to appear like subfolders in clean URL mode and you should add a trailing slash when you’re linking to a subfolder even if it works without it.

Thanks for getting back to me. I’m trying to use http://textpattern.org/plugins/654/directory-gallery which pulls images direct from a real directory. Let’s say there are some images in the photos directory in the root of the server: If I’m in www.myworld.com/features/ (notice the trailing /) the the directoy-gallery plugin tries to fetch the images from www.myworld.com/features/photos/ – and fails. But if the url is www.myworld.com/features the directory-gallery finds the images in www.myworld.com/photos no problem. Do you have any suggestions?

Many thanks, Lee

Offline

#22 2006-10-14 20:15:22

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

So, it’s a known bug in your gallery plugin. That’s because the author passes a relative path to the opendir() php function, instead of an absolute one. I will look at the code of this plugin and post a fix.

Edit: seems harder than I thunk, the plugin does not work at all on my test server. I’ll look at the code to see how I could fix it. Furthermore, this plugin only works with PHP5 because it uses PHP5-specific functions, even if the homepage mentions that it has been tested with PHP 4.0.4.

Last edited by cbeyls (2006-10-14 20:48:21)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#23 2006-10-14 20:18:51

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

Re: cbs_navigation_menu

That would be brilliant, many thanks for taking the time to look in to it.

Offline

#24 2006-10-15 16:07:35

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

So… I looked at the code of directory-gallery. Not the best I’ve ever seen. Well okay, the author says he’s not a web developer but a C and assembler guy. Maybe he hasn’t noticed that PHP is very similar to C, with a more flexible type system and more available functions.

Well, I don’t want to rewrite this plugin, I just want to make it work as it should so lee can use it on his site along with cbs_navigation_menu.

So, Lee, find this block in the code of directory-gallery and replace it with this block.

You still need to prefix the images with 2 digits or they will not be listed, but this time you can use any 2-digit number (previously you could not use “0” as second digit!) and even twice the same number, images will then be sorted alphabetically.

You must place the images folder in the root folder of your website, at the same level as the textpattern folder and just reference it like this for example: ‘folder’. Or you can use a subfolder and reference it like this: ‘folder/subfolder’. You get the idea. And now the gallery will work with any URL, including the ones with a trailing slash, because the paths are now absolute instead of relative.

Note: Please be patient with the pastebin website, it may take 2 or 3 minutes to display the page, I hope they will fix that soon.

Last edited by cbeyls (2006-10-15 16:10:28)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#25 2006-10-15 16:40:57

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

Re: cbs_navigation_menu

Hi Christophe, thank you, it was very kind of you to do this for me. When someone you don’t know spends time helping you, like you have for me, it makes the world a better place.

Offline

#26 2006-11-09 21:17:38

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

Re: cbs_navigation_menu

Hi cbeyls.
I’m giving this a try, in replacement of ako_nav and it works fine, as expected.
It has less attributes than ako_nav (like all the wrap div and heading stuff), but all those things can be added manually (as real HTML) directly wrapping your plug-in tag.

Nice one.
Thanks.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#27 2006-11-21 14:33:36

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

Re: cbs_navigation_menu

Hi.

I have found a little problem that I didn’t have with ako_nav.
I cant point directly to articles URLs using cbs_navigation_menu.

<txp:cbs_navigation_menu titles="¿Cómo comprar?,Acerca de Cluster,Contactanos,Blog" sections="acerca-de/como-comprar-nuestros-productos,acerca-de,contacto,blog" wraptag="ul" break="li" activeclass="active" />

Check the acerca-de/como-comprar-nuestros-productos.
The link generated is: acerca-de%2Fcomo-comprar-nuestros-productos/

cbeyls, do you think this could be fixed?

Thanks in advance.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#28 2006-11-21 18:07:47

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: cbs_navigation_menu

Can this plugin be used with your cbs_category_list plugin? For example, loop through the list of sections and the categories associated with the sections?

For example, I have something like this in a form, which lists the current sections in the order I wish, then checks for categories under the sections.

Just wondering if this can be done with your plugins (combined).

<code>
<ul class=“menublock”>
<li><a href=“http://site.com/”>home</a></li>
<li><a href=“http://site.com/about/”>about</a></li>
<txp:cbs_category_list parent=“about” wraptag=“ul” break=“li” class=”“ />
<li><a href=“http://site.com/training/”>training</a></li>
<txp:cbs_category_list parent=“training” wraptag=“ul” break=“li” class=”“ />
<li><a href=“http://site.com/news/”>news</a></li>
<txp:cbs_category_list parent=“news” wraptag=“ul” break=“li” class=“menublock” />
<li><a href=“http://site.com/faq/”>faq</a></li>
<txp:cbs_category_list parent=“faq” wraptag=“ul” break=“li” class=“menublock” />
<li><a href=“http://site.com/contact/”>contact</a></li>
</ul>
</code>

Offline

#29 2006-11-22 19:04:36

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: cbs_navigation_menu

Just want to confirm, that the plugin works fine, with what I want it to do, and to express my thanks to Christophe for his work, and listening to all the requests , and making it available to the community.

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#30 2007-12-17 03:57:20

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: cbs_navigation_menu

is it possible to just specify the two sections you want to come first on the list then the rest.

something like this:

<txp:section_list active_class=“activelist” break=“li” class=“navlist” default_title=“Financial Service” label=“Financial Services” exclude=“about, faqs, contact, advitorial” labeltag=“h3” wraptag=“ul” order=“pensions” sections=“pensions, protections(then all the rest without having to list them)” />

thanks


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB