13, February 2012

My pagina script: mod to hide unnecessary previous / next links - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Miscellaneous scripts or snippets (Moderator: Olaf)
Topic: My pagina script: mod to hide unnecessary previous / next links
« previous next »
Pages: [1] Print

Author Topic: My pagina script: mod to hide unnecessary previous / next links  (Read 2072 times)
I crack Photoshop!
*
Gender: Male
Posts: 3
22 credits
Members referred : 0


« on: Dec 07, 2006, 08:50:43 pm »

using the nice My Pagina script, i wanted simple back/next buttons (no direct link to a page).
It works fine, except that it was printing the "previous page" image even on page 0, and the "next page" image even on the last page.

this simple modification took care of removing it:

Code:
            if ($all_pages >= 1) {
                $forward = $curr_pages + 1;
                $backward = $curr_pages - 1;
                // the text two labels are new sinds ver 1.02
                // PIXELINE HACK TO HIDE UNNECESSARY NEXT/PREV LINKS
                if ($backward > -1) {
                    $lbl_backward = $this->build_back_or_forward("backward", $use_images);
                }
                if ($curr_pages < $all_pages) {
                    $lbl_forward = $this->build_back_or_forward("forward", $use_images);
                }
                // END HACK
                $navi_string = ($curr_pages > 0) ? "<a href=\"" . $_SERVER['PHP_SELF'] . "?" . $var . "=" . $backward . $this->rebuild_qs($var) . "\">" . $lbl_backward . "</a>&nbsp;" : $lbl_backward . "&nbsp;";

i hope it helps. Maybe it would be nice to include it in the next version Smiley

cheers,

Alex
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Dec 07, 2006, 09:47:41 pm »

I will think about, while I don't like to add modifications in the scripts, is it possible with mod to show the "unwanted" text as well?


Last blog : A new Wordpress theme for our blog
I crack Photoshop!
*
Gender: Male
Posts: 3
22 credits
Members referred : 0


« Reply #2 on: Dec 07, 2006, 11:07:00 pm »

hi olaf,
why would you want to show arrows when they are not clickable? It's just confusing for the website visitor...

If you want to display them nonetheless, just use the class as it is delivered.

cheers,

Alex
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Dec 08, 2006, 12:09:36 am »

hi olaf,
why would you want to show arrows when they are not clickable? It's just confusing for the website visitor...

If you want to display them nonetheless, just use the class as it is delivered.

cheers,

Alex
just to show that there is some navigation the array is not clickable, I can't see the problem.

never got complains before, but I will think about that for the next upgrade

I think its more important to show the visitor on which page the visitor is currently and that's not a problem.
You can give the not linked elements some light grey color, then is everything fine Wink


Last blog : A new Wordpress theme for our blog
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #4 on: Dec 08, 2006, 12:12:13 am »

Quote
If you want to display them nonetheless, just use the class as it is delivered.

Look my classes are used by a lot of people because I try to keep them flexible, at the moment you have to versions the flexibility is gone.

the right way is to modify tyhe class that people with older scripts can use the new version and the "hidden" arrows are an option Wink


Last blog : A new Wordpress theme for our blog
I crack Photoshop!
*
Gender: Male
Posts: 3
22 credits
Members referred : 0


« Reply #5 on: Dec 08, 2006, 11:19:01 pm »

nothing prevents you from improving my mod, make it optional, and include it in the next version as long as you understand its purpose, that was in fact the reason why i took the initiative to share my hack.

thank you,

alex
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=5113
Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Miscellaneous scripts or snippets (Moderator: Olaf)
Topic: My pagina script: mod to hide unnecessary previous / next links
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 13, 2012, 09:52:19 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.