Home arrow Forum

Remository Forum

 


<< Start < Previous 1 2 Next > End >>
AlCher

Karma: 0  
glossary.php - 2005/09/12 19:43 1. function GlossaryABC(&$glossary, $letter, $page=1)
line - return substr($nav,0,strlen($nav)-3)."n</div>nn"; // end of HTML
'strlen ($nav)-3' shortens tag "/a" at the end of a line. Is displayed as "/
Code:

 <a href='index.php?option=com_glossary&func=display&letter=Other&Itemid=56&catid=36&page=1'Other</ Should be: <a href='index.php?option=com_glossary&func=display&letter=Other&Itemid=56&catid=36&page=1'>Other</a>



2. A code:
Code:

 echo ' <a href="'.$url.'">$i</a>'Is displayed$i $i $i $i If to use a code: echo "<a href='".$url."'>$i</a>"that displayes 1 2 3 4

  | | Sorry, you do not currently have permission to write here.
admin

Karma: 57  
Re:glossary.php - 2005/09/13 00:48 Sorry, I don't quite follow this. The last line of the "foreach" loop adds three characters to the string, containing blank-vertical line-blank. Once the loop ends, there is one too many of these, and the substring knocks 3 characters off the end. That should be OK? Martin Brampton aka Counterpoint
http://black-sheep-research.com
http://mamboguru.com
  | | Sorry, you do not currently have permission to write here.
AlCher

Karma: 0  
Re:glossary.php - 2005/09/13 12:46 1.
If 'strlen ($nav)-3', are not displayed (in html-code)at the end of last line of the alphabetic block "a>", only "</"
If 'strlen ($nav)-1', all OK. Is displayed in html-code "</a>".
But whether will be correct 'strlen ($nav)-1'?

2.
If echo '<a href="'.$url.'">$i</a>'; that displayed in frontend 1 $i $i $i $i »
If echo "<a href='".$url."'>$i</a>"; that displayed correct 1 2 3 4 5 »

Post edited by: AlCher, at: 2005/09/13 08:03

Post edited by: AlCher, at: 2005/09/13 08:21
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 57  
Re:glossary.php - 2005/09/13 14:12 Sorry, I'm still lost on the first one! Are we talking about Glossary 1.6? Has the code been altered in any way?

1) I don't claim to understand this code in detail yet, but the routine glossaryABC seems relatively simple. It loops through the alphabet (plus All and Other) generating either an emboldened letter or a letter as an HTML link. Each one is followed by ' | ' which is three characters long. As this is a separator, it is removed at the very end, as there will be one too many. It works here - see http://www.remository.com/component/option,com_glossary/. So far, I'm stuck to see why it would fail elsewhere

2) Thanks for this - it is a bug that I've introduced and will fix soon.
Martin Brampton aka Counterpoint
http://black-sheep-research.com
http://mamboguru.com
  | | Sorry, you do not currently have permission to write here.
AlCher

Karma: 0  
Re:glossary.php - 2005/09/13 15:06 Yes, I have replaced ' | ' on ' ' ( $nav. = ' ' ). Probably in it the reason. A thank your for an explanation.

Post edited by: AlCher, at: 2005/09/13 10:08
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 57  
Re:glossary.php - 2005/09/13 21:01 No problem. It is safe to reduce the 3 in the substr and make it the length of the text you are using as a separator instead of ' | '. Should work fine. Martin Brampton aka Counterpoint
http://black-sheep-research.com
http://mamboguru.com
  | | Sorry, you do not currently have permission to write here.
<< Start < Previous 1 2 Next > End >>

Menu

Budding author?

Could you write about software?  Packt Publishing is looking for authors for its new series of Beginners' Guides.  Take a look at their web site to find out more.

Login Form

Username

Password

Remember me
Password Reminder
No account yet?
Create one

Who is Online

Remository welcomes guests and registered users.

We have 18 guest online