Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: 1 [2] 3 4   Go Down

Author Topic: add 'previous' and 'next' to page tabs.  (Read 81193 times)

0 Members and 1 Guest are viewing this topic.

Hein Traag

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: nl
  • Offline Offline
  • Gender: Male
  • Posts: 2166
  • A, B, Cpg
    • Personal website - Spintires.nl
Re: add 'previous' and 'next' to page tabs.
« Reply #20 on: May 11, 2005, 05:38:27 pm »

Has someone managed to put the next and forward above the thumbnails yet ? Or is that something which can't be done nicely ?
Logged

steverobbins

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • photographer
    • Steve Robbins' Personal Website
Re: add 'previous' and 'next' to page tabs.
« Reply #21 on: May 11, 2005, 06:48:08 pm »

It works a treat!  Thanks for this mod, I've been thinking about how to make this work for a while.

Live example at http://www.steverobbins.co.uk/gallery/thumbnails.php?album=2&page=23

Cheers,
Steve.

xpurtwitness

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Junk & Conversation
Re: add 'previous' and 'next' to page tabs.
« Reply #22 on: July 11, 2005, 11:37:32 pm »

yikes!  i just made the changes, and i'm getting major errors.  http://stedfast.net/gallery

any thoughts?
Logged

modtang

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: add 'previous' and 'next' to page tabs.
« Reply #23 on: July 12, 2005, 12:26:27 am »

Thanks for this hack. I wanted to add something like this and it was so simple to do. Much appreciated.  ;D

As for those errors, I'm gonna take a stab at it and say you're only replacing the one line in functions and not the WHOLE function.

Quote
in functions.inc.php, find the function
Code: [Select]
function create_tabs($items, $curr_page, $total_pages, $template)replace the WHOLE function with...

The whole function starts at the above code and ends at
Code: [Select]
        return $tabs.$template['tab_trailer'];
}
Logged

xpurtwitness

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Junk & Conversation
Re: add 'previous' and 'next' to page tabs.
« Reply #24 on: July 12, 2005, 05:28:20 am »

wonderful!  i thought it was weird that there wasn't an ending described.  so it seems to work.  however, i don't see the current page number highlighted...  well it seems it is technically a different color, but i think i need a bigger contrast.  what element will i need to change the assigned color for?
Logged

xpurtwitness

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Junk & Conversation
Re: add 'previous' and 'next' to page tabs.
« Reply #25 on: July 12, 2005, 02:41:48 pm »

well i think i have it...the tableb_compact class.  however, it also influences the descriptions on the main page...
Logged

modtang

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: add 'previous' and 'next' to page tabs.
« Reply #26 on: July 18, 2005, 03:02:53 pm »

How does it influence the description? I didn't notice any change with my gallery. You were right though. Under

Code: [Select]
.tableb_compact
change

Code: [Select]
background: #515b67;
to whatever you want it to be.

Working example: http://carminegiovinazzo.net/gallery/

Has someone managed to put the next and forward above the thumbnails yet ? Or is that something which can't be done nicely ?

Isn't this what the filmstrip does?
« Last Edit: July 18, 2005, 03:16:58 pm by modtang »
Logged

pious

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: add 'previous' and 'next' to page tabs.
« Reply #27 on: August 17, 2005, 04:22:04 pm »

I must have done something wrong.  I was successful at adding the PREV/NEXT to my page, but now I've lost the numbers.  What did I do wrong?  Or, better yet, how can I get the numbers back and still have the PREV/NEXT on each page?

Please advise.   :-\\
Logged

snork13

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 260
  • Internet! Is that thing still around?
    • Gallery
Re: add 'previous' and 'next' to page tabs.
« Reply #28 on: August 17, 2005, 04:44:33 pm »

I must have done something wrong.  I was successful at adding the PREV/NEXT to my page, but now I've lost the numbers.  What did I do wrong?  Or, better yet, how can I get the numbers back and still have the PREV/NEXT on each page?

Please advise.   :-\\

i would try it again from your backup file, if you don't get that time, post what you've done so far.

-snork

below is the theme.php part, should help!

Code: [Select]
    $theme_thumb_tab_tmpl = $template_tab_display;

    if ($mode == 'thumb') {
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['pic_on_page']));
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
        $theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
        $theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'thumbnails.php?album=' . $aid . $cat_link . '&page=%d'));
    } else {
        $theme_thumb_tab_tmpl['left_text'] = strtr($theme_thumb_tab_tmpl['left_text'], array('{LEFT_TEXT}' => $lang_thumb_view['user_on_page']));
        $theme_thumb_tab_tmpl['inactive_tab'] = strtr($theme_thumb_tab_tmpl['inactive_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
        $theme_thumb_tab_tmpl['inactive_next_tab'] = strtr($theme_thumb_tab_tmpl['inactive_next_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
        $theme_thumb_tab_tmpl['inactive_prev_tab'] = strtr($theme_thumb_tab_tmpl['inactive_prev_tab'], array('{LINK}' => 'index.php?cat=' . $cat . '&page=%d'));
    }
« Last Edit: August 17, 2005, 05:02:50 pm by snork13 »
Logged

PKfanSteph

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 10
    • Concert Photos @ PlayThruMe.com
Re: add 'previous' and 'next' to page tabs.
« Reply #29 on: August 18, 2005, 08:34:56 am »

I made the changes and am getting the error:

Quote
Parse error: parse error, unexpected T_STRING in /usr/local/psa/home/vhosts/playthrume.com/httpdocs/photos/include/functions.inc.php on line 202

Any ideas?  I'm using a modified version of the Digital Red theme.
Logged

yoshikiwei

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 68
Re: add 'previous' and 'next' to page tabs.
« Reply #30 on: August 18, 2005, 10:57:15 am »

I must have done something wrong.  I was successful at adding the PREV/NEXT to my page, but now I've lost the numbers.  What did I do wrong?  Or, better yet, how can I get the numbers back and still have the PREV/NEXT on each page?

Please advise.   :-\\

Yes I would recommend that you do a backup from the old files and try the mod all over again.
Logged

yoshikiwei

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 68
Re: add 'previous' and 'next' to page tabs.
« Reply #31 on: August 18, 2005, 10:58:04 am »

I made the changes and am getting the error:

Quote
Parse error: parse error, unexpected T_STRING in /usr/local/psa/home/vhosts/playthrume.com/httpdocs/photos/include/functions.inc.php on line 202

Any ideas?  I'm using a modified version of the Digital Red theme.

What's on line 202 of your functions.inc.php ?
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: add 'previous' and 'next' to page tabs.
« Reply #32 on: September 16, 2005, 10:12:49 pm »

Anybody did this for the userlist aswell?

I'll try myself and post the code here if I succeed   :D
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214
Re: add 'previous' and 'next' to page tabs.
« Reply #33 on: September 17, 2005, 12:54:21 am »

Ok well shame on me for asking it was too easy.....

find in usermgr.php:

Code: [Select]
$tab_tmpl = array('left_text' => '<td width="100%%" align="left" valign="middle" class="tableh1_compact" style="white-space: nowrap"><b>' . $lang_usermgr_php['u_user_on_p_pages'] . '</b></td>' . "\n",
        'tab_header' => '',
        'tab_trailer' => '',
        'active_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="tableb_compact"><b>%d</b></td>',
        'inactive_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="navmenu"><a href="' . $PHP_SELF . '?page=%d&sort=' . $sort . '"<b>%d</b></a></td>' . "\n"
        );

replace by:

Code: [Select]
$tab_tmpl = array('left_text' => '<td width="100%%" align="left" valign="middle" class="tableh1_compact" style="white-space: nowrap"><b>' . $lang_usermgr_php['u_user_on_p_pages'] . '</b></td>' . "\n",
'tab_header' => '',
'tab_trailer' => '',
'active_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="tableb_compact"><b>%d</b></td>',
'inactive_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="navmenu"><a href="' . $PHP_SELF . '?page=%d&sort=' . $sort . '"<b>%d</b></a></td>' . "\n",
'active_next_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="tableb_compact"><b>%s</b></td>',
'inactive_next_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="navmenu"><a href="' . $PHP_SELF . '?page=%d&sort=' . $sort . '"<b>%s</b></a></td>',
'active_prev_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="tableb_compact"><b>%s</b></td>',
'inactive_prev_tab' => '<td><img src="images/spacer.gif" width="1" height="1"></td>' . "\n" . '<td align="center" valign="middle" class="navmenu"><a href="' . $PHP_SELF . '?page=%d&sort=' . $sort . '"<b>%s</b></a></td>',
);
« Last Edit: September 17, 2005, 11:02:09 am by xplicit »
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

PKfanSteph

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 10
    • Concert Photos @ PlayThruMe.com
Re: add 'previous' and 'next' to page tabs.
« Reply #34 on: September 23, 2005, 11:57:08 pm »


Has someone managed to put the next and forward above the thumbnails yet ? Or is that something which can't be done nicely ?

Isn't this what the filmstrip does?


I like this next/previous part, but my biggest problem is users who just look at the thumbnails page and don't go to the full size image until they see something they like.  My image views count always decreases after the initial page of thumbnails.   Adding the filmstrip doesn't help in this case.  I still would prefer the numbers AND the next / previous links both above and below the thumbnails.  Picky, aren't I?  ;).  Just a personal preference, I suppose.
Logged

sion3000

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • http://www.coolshots.co.uk
Re: add 'previous' and 'next' to page tabs.
« Reply #35 on: September 26, 2005, 10:43:13 pm »

EDIT: Sorry just managed to fix this. I didnt edit enough of the code in the functions.inc.php finaly got it working. Great hack.
If anyone gets notices when they are not in debug mode for this hack check that the last thing after the final bit of code it /** or something simelar.
Keep up good work everyone.!!!


Hello

I have added the new previous and next into my code. But i am now getting notices appear. My seeting for "Show notices in debug" is shwitched off + im not even running in debug mode. Is there any way of turning off these notices off in normal mode ?

My lines ive got problems with:

Notice: Undefined index: max_tabs in /files/home2/sion3000/include/functions.inc.php on line 267
Notice: Undefined variable: template in /files/home2/sion3000/include/functions.inc.php on line 269
Notice: Undefined variable: items in /files/home2/sion3000/include/functions.inc.php on line 269
Notice: Undefined variable: total_pages in /files/home2/sion3000/include/functions.inc.php on line 269
Notice: Undefined variable: total_pages in /files/home2/sion3000/include/functions.inc.php on line 270
Notice: Undefined variable: template in /files/home2/sion3000/include/functions.inc.php on line 272
Notice: Undefined variable: curr_page in /files/home2/sion3000/include/functions.inc.php on line 273
Notice: Undefined variable: template in /files/home2/sion3000/include/functions.inc.php on line 276
Notice: Undefined variable: total_pages in /files/home2/sion3000/include/functions.inc.php on line 278
Notice: Undefined variable: total_pages in /files/home2/sion3000/include/functions.inc.php on line 284
Notice: Undefined variable: total_pages in /files/home2/sion3000/include/functions.inc.php on line 293
Notice: Undefined variable: template in /files/home2/sion3000/include/functions.inc.php on line 300

Any sugestions anyone ?

I have a while back upgraded from 1.2 --> 1.33 without any problems + have the pay pal shop hack in my theme.

Thanks

Sion

Oh my site is www.coolshots.co.uk

thanks
« Last Edit: September 26, 2005, 10:56:51 pm by sion3000 »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: add 'previous' and 'next' to page tabs.
« Reply #36 on: September 27, 2005, 07:41:52 am »

turn off notices if they don't mean anything to you.
Logged

COS@RIN

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cosarin Internet
Re: add 'previous' and 'next' to page tabs.
« Reply #37 on: November 06, 2005, 03:56:32 am »

For all you 1.4x people.

This seems to work fantastically in the beta version now.

One of the Dev Team must have sorted it, however all the code posted by Yoshikiwei is allready in the file codes except the first alteration in themes.php. The only thing to remember is that if you have used the classic template as your base then the thems.php file is in the includes folder and called themes.inc.php

Thanks DEV team for a fantastic gallery.


COSARIN
Logged

AWJunkies

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 130
Re: add 'previous' and 'next' to page tabs.
« Reply #38 on: January 30, 2006, 06:23:46 am »

Yep works perfect for 1.4.3

Most of the editing is already done with theme.inc.php, very easy mod takes 2 minutes if that.
Logged

CypherBit

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 30
Re: add 'previous' and 'next' to page tabs.
« Reply #39 on: February 11, 2006, 07:33:15 pm »

Great mod, thank you.

But I have a problem validating it: http://www.cypherbit.com/coppermine/ I get two errors: http://validator.w3.org/check?uri=http://www.cypherbit.com/coppermine/ anyone able to fix this?
Logged
Pages: 1 [2] 3 4   Go Up
 

Page created in 0.031 seconds with 20 queries.