Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2   Go Down

Author Topic: Pagination CPG  (Read 11071 times)

0 Members and 1 Guest are viewing this topic.

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Pagination CPG
« on: February 12, 2013, 06:04:40 pm »

I welcome you Αndré. There was one problem, please help to solve it.
I need to have the text describing the album (class = "albdesc") is only output on the first page of the album.
Here:
http://i51.fastpic.ru/big/2013/0212/f7/63afa4053e107645199fcdaed01a39f7.jpg

It is also necessary to class = "albdesc" was under the photo. Here:
http://i51.fastpic.ru/big/2013/0212/c6/3dd3c8999bfe1eb2588fff7327ebe0c6.jpg
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #1 on: February 13, 2013, 09:09:27 am »

I guess you're using this mod to display the album description on the thumbnails page? If so, it works for me as expected.

Please also post a link to your gallery.
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #2 on: February 13, 2013, 09:51:59 am »

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #3 on: February 13, 2013, 10:03:26 am »

The album description is displayed for me on all three pages of that album: http://www.krasivye-devushki.net/thumbnails.php?album=2

Maybe I misunderstood your request. Do you want to display the album description additionally at the bottom of each thumbnail page?
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #4 on: February 13, 2013, 10:06:19 am »

Yes, at the bottom :)

I also want to description of the album is not duplicated on other pages, because it is bad for SEO :)
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #5 on: February 13, 2013, 10:10:57 am »

I would also like to description of the album was not a question of solid text, and was divided into paragraphs. And so you can use BB-code to identify the keys to the <strong> tag, well, the same as in the file anycontent.php
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #6 on: February 13, 2013, 10:28:17 am »

So you want to display the album description above and below the thumbnails, but just on the first thumbnail page of each album, correct?
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #7 on: February 13, 2013, 10:30:52 am »

Yes, the thumbnails below, and only on the first page of each album :)
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #8 on: February 13, 2013, 10:44:56 am »

Just below the thumbnails! Otherwise, why would two of the same type on a page!? :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #9 on: February 13, 2013, 11:44:38 am »

Undo your current mod to remove the album description above the thumbnails.

Copy function theme_display_thumbnails to your themes theme.php file if it doesn't exists. Then, find
Code: [Select]
    CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);and replace with
Code: [Select]
    CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);

    if ($page == 1) {
        echo $CURRENT_ALBUM_DATA['description'];
    }
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #10 on: February 13, 2013, 12:05:36 pm »

Thank you very much Αndré, it works. And tell me how I can do to be able to use bb-code? And so you can share the text into paragraphs?
Here:
http://i51.fastpic.ru/big/2013/0213/0a/065eb799ffbba437c615ab240de5010a.jpg
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #11 on: February 13, 2013, 12:47:32 pm »

Use this code:
Code: [Select]
    CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);

    if ($page == 1) {
        echo bb_decode($CURRENT_ALBUM_DATA['description']);
    }
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #12 on: February 13, 2013, 12:57:31 pm »

Since paragraphs worked and tagged unfortunately not :(
Here:
http://i54.fastpic.ru/big/2013/0213/99/da019d6459c5c7fa6d182f7633634099.jpg
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #13 on: February 13, 2013, 01:02:38 pm »

Use [b] instead of [strong].
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #14 on: February 13, 2013, 01:07:32 pm »

Thank you very much, I'll know now :)

I'll probably already tired at all, I only have one last question for.These pages are doubles:
http://www.krasivye-devushki.net/thumbnails.php?album=2
and
http://www.krasivye-devushki.net/thumbnails.php?album=2&page=1

Can I make the page to http://www.krasivye-devushki.net/thumbnails.php?album=2&page=1, always appear as http://www.krasivye-devushki.net/thumbnails.php?album=2 ?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #15 on: February 13, 2013, 01:11:15 pm »

That should be possible with an appropriate rewrite rule on web server level. Alternatively you have to modify the Coppermine code at probably various places.
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #16 on: February 13, 2013, 01:16:44 pm »

In .htaccess 301 redirect? :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Pagination CPG
« Reply #17 on: February 13, 2013, 02:07:59 pm »

Try something like
Code: [Select]
RewriteEngine  on
RewriteCond %{QUERY_STRING} ^(.*)&page=1$ [NC]
RewriteRule ^thumbnails\.php$  http://www.krasivye-devushki.net/thumbnails.php?%1
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #18 on: February 13, 2013, 02:26:04 pm »

Αndré once again thank you very much for the points that helped me optimize the photo gallery!  ;)
Logged

serg5777

  • Coppermine frequent poster
  • ***
  • Country: ru
  • Offline Offline
  • Gender: Male
  • Posts: 171
    • Широкоформатные обои для рабочего стола
Re: Pagination CPG
« Reply #19 on: March 01, 2013, 09:28:14 am »

Good day Andre!
I can not set the style in anycontent.php, namely:
Code: [Select]
echo <<< EOT
    <tr>
        <td class="tableb">
text
</td>
    </tr>

EOT;

endtable();

When it is added before the line:
Code: [Select]
CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);Gallery stops working.

Please tell me where I need to insert these tags, it does not look very nice :)
Here are screenshots:
anycontent.php: http://i52.fastpic.ru/big/2013/0301/a0/8814355716320d3a5207f3b0a31a17a0.jpg
thumbnails: http://i54.fastpic.ru/big/2013/0301/4d/cef8f388f4f304d646037a681621a64d.jpg
Logged
Pages: [1] 2   Go Up
 

Page created in 0.026 seconds with 20 queries.