1
jayjay
better xoopstree getnicepathfromid
  • 2007/8/30 9:51

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Hi all!

I have added these lines in class/xoopstree.php
$path $this->getNicePathFromId($parentid$title$funcURL$path);
[
color=FF0000]$path trim($path);
$path substr($path0strlen($path) - 13);[/color]


This trims the final separator when you make a breadcrumb path.

Before:
Start : Module : Page :

Now:
Start : Module : Page

Could this be added to the following release of xoops? Idea mostly stolen from wfdownloads, so credit to smartfactory

2
davidl2
Re: better xoopstree getnicepathfromid
  • 2007/8/30 10:43

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Thank you for the fix - can you add this to the SF tracker at all?

Thanks


Edit: Marcan, you beat me to it!

3
marcan
Re: better xoopstree getnicepathfromid
  • 2007/8/30 10:43

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Hi, jayjay,

Could you add this in the pacth tracker on SourceForge ?

Thanks !
.:: marcan (aka mal aka Marc-André) ::.
.:: Open Source :: The SmartFactory ::.
.:: XOOPS Professional Services :: INBOX International ::.

4
jayjay
Re: better xoopstree getnicepathfromid
  • 2007/8/30 12:21

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


I added this issue to the tracker, with some extra comment on module interoperability.

5
hervet
Re: better xoopstree getnicepathfromid
  • 2007/8/30 13:18

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Quote:

jayjay wrote:
$path substr($path0strlen($path) - 13);


May I can suggest you to test for the string's length before to make -13 ?
This will be better for empty strings

6
jayjay
Re: better xoopstree getnicepathfromid
  • 2007/8/30 14:17

  • jayjay

  • Not too shy to talk

  • Posts: 175

  • Since: 2003/9/10


Quote:

hervet wrote:
Quote:

jayjay wrote:
$path substr($path0strlen($path) - 13);


May I can suggest you to test for the string's length before to make -13 ?
This will be better for empty strings


I don't know what you're aiming at? The -13 is correct because we are removing this from xoopstree.php:
 : 


which is exactly 13 bits.

Login

Username:
Password:

Lost Password? Register now!

Who's Online

65 user(s) are online (39 user(s) are browsing Support Forums)


Members: 0


Guests: 65


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits