Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » [archived] tcm_crumbs

#61 2004-11-28 05:56:59

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

Re: [archived] tcm_crumbs

Did anyone get anywhere with this? Perhaps its best to revert to the initial version…?

Offline

#62 2004-12-04 19:54:04

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: [archived] tcm_crumbs

Okay, I’m almost ready to release the better version of this plugin, with a lot of improvements, etc.

However, there’s one thing that’s missing – consider this a “ransom” in the style of zem, except it’s a code ransom, rather than a cash ransom.

I need preg_replace code to do this:

<pre>
Find [null], with any extra stuff between the [, ], and “null”. For instance,
[(any characters, etc) null (other stuff)]
[stuff null]
[null %#$]
[null]
should all be found.
And replace it with nothing – “”.
Currently I have
$data = preg_replace(“/\[(.)\\null/(.)\]/”,”“,$data);
I know this is wrong, but it’s an example of where I’m trying to go
</pre>

Last edited by tmacwrig (2004-12-04 19:54:21)

Offline

#63 2005-01-10 00:09:55

tee
New Member
From: Norway
Registered: 2004-09-19
Posts: 9

Re: [archived] tcm_crumbs

Looking forward to the release :)


Proud VCII

Offline

#64 2005-01-19 13:37:55

hurben
Member
Registered: 2005-01-17
Posts: 11

Re: [archived] tcm_crumbs

My 1st Post. Hello and thanks for having me.

After toying with other Content Management Systems, I finally decided to go with Textpattern and I haven’t had any problems (ignoring the ‘tilde’ path image upload issue, I plan to upload to my server before I get onto that one.. ;) until this darstardly breadcrumbs plugin.

This could be so sweet.. I’ve tried both the initial plugin and the vers. 2
I could get the first version to work although I couldn’t get rid of the ‘Default’ text on the homepage, nor could I get it to display the name of the currently displayed article.

As for Version 2. I couldn’t get it to do anything except for display ‘Home’ on every page..

What I’m after is, breadcrumbs in this format: Home > Section > Article
Simple hey? I thought so too.. If anyone can help me out.. please let me know.

Thanks, and I’ll see you about.

Offline

#65 2005-01-19 13:48:08

Case
Member
From: UK
Registered: 2004-02-25
Posts: 20
Website

Re: [archived] tcm_crumbs

I’ve found that this plug-in doesn’t work for me either. I have a very hacked version that does work in this format:

Home > Section > Category > Article.

I can post the php code for this if anyone is interested. It requires a function from another plug-in which would also need to be installed.


Forget your dreams

Offline

#66 2005-01-19 14:04:33

hurben
Member
Registered: 2005-01-17
Posts: 11

Re: [archived] tcm_crumbs

sure thing.. anything to pass the time would be great!

Offline

#67 2005-01-19 14:12:52

Case
Member
From: UK
Registered: 2004-02-25
Posts: 20
Website

Re: [archived] tcm_crumbs

First install this plugin

Then using the admin section replace all the code for the tcm_crumbs plugin with this

<code>
function tcm_crumbs($atts) {

global $pretext;

$id = $pretext[‘id’]; $section = $pretext[‘s’];

if (isset($id)) { $art = safe_row(‘title, category1’, ‘textpattern’, ‘id=’.$id); extract($art); }

if (is_array($atts)) extract($atts); if(!$combine) $combine = “ &amp; “;

if (isset($category1)) { $curr_cat = $category1; } else { $curr_cat = gps(“c”); }

//create link to home $out .= “<a href=\”“.$pretext[‘pfr’].”\”>”; $out .= $hometitle; $out .= “</a>”;

if($mode "s"||$mode “sc”||$mode == “scc”) { $out .= $separator; $out .= “<a href=\”“.$pretext[‘pfr’].$pretext[‘s’].”\”>”; $out .= $section; $out .= “</a>”; }

if(($mode "sc"||$mode “scc”||$mode "c"||$mode “cc”) && !empty($curr_cat)) { $out .= $separator; $out .= stw_cat_link($curr_cat,$section); }

if(isset($title)) { $out .= $separator; $out .= $title; }

return $out;
}
</code>

and then use this tag in your template

<code>
<txp:tcm_crumbs mode=“sc” hometitle=“home” separator=” &#187; “ />
</code>


Forget your dreams

Offline

#68 2005-01-19 14:14:36

Case
Member
From: UK
Registered: 2004-02-25
Posts: 20
Website

Re: [archived] tcm_crumbs

Forgot to mention, my hack has only been tested on 1.0 RC2


Forget your dreams

Offline

#69 2005-01-19 14:22:14

hurben
Member
Registered: 2005-01-17
Posts: 11

Re: [archived] tcm_crumbs

I did exactly what you said..
All I got was a blank page, but I don’t think I have error reporting on anyway..
then I realised I only have 1.0rc1 .. I didn’t know there was RC2

Thanks for the quick response btw

Offline

#70 2005-01-22 04:50:51

lwray
Member
From: Allston, MA
Registered: 2004-12-02
Posts: 21
Website

Re: [archived] tcm_crumbs

I just tried the original version – which works flawlessly for me – because I didn’t see the newest version at first, but after reading all these comments I don’t see the point of upgrading. Wish I could help, but hardly know PHP. In any case, thanks for a great plugin.

Offline

#71 2005-01-23 18:08:00

hurben
Member
Registered: 2005-01-17
Posts: 11

Re: [archived] tcm_crumbs

Do you get the text “default” when browsing your index page?
(i.e. Home >> Default)

Offline

#72 2005-02-07 07:21:41

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

Re: [archived] tcm_crumbs

People, people. If had so much trouble with this plugin before I started to realize what’s wrong. This heavily relies on the $thisarticle TXP global variable to get the current acrticle’s title and categories. The problem is that $thisarticle is null until the article form starts to get processed, so when ever I called the plugin in the header section of my pages, the category and the page title seemed to be blank.

So, how would you include your breadcrumbs menu to the header section of your pages, a few lines (in HTML code) above the article form output? I’ve come up with using CSS absolute positioning, as you can see here.

Last edited by Etz Haim (2005-02-19 19:40:30)

Offline

  1. Index
  2. » Archives
  3. » [archived] tcm_crumbs

Board footer

Powered by FluxBB