Pagination CPG Pagination CPG
 

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

Main Menu

Pagination CPG

Started by serg5777, February 12, 2013, 06:04:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

serg5777

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

Αndré

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.

serg5777


Αndré

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?

serg5777

Yes, at the bottom :)

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

serg5777

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

Αndré

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

serg5777

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

serg5777

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

Αndré

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
    CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);
and replace with
    CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);

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

serg5777

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

Αndré

Use this code:
    CPGPluginAPI::action('theme_thumbnails_wrapper_end', null);

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


serg5777


Αndré

Use [b] instead of [strong].

serg5777


Αndré

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.

serg5777

In .htaccess 301 redirect? :)

Αndré

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

serg5777

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

serg5777

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

EOT;

endtable();


When it is added before the line:
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