When vote for file... New feature. - Page 2 When vote for file... New feature. - Page 2
 

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]

Main Menu

When vote for file... New feature.

Started by Master of Orion, March 06, 2006, 10:59:28 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

trippinsweet

I couldn't get it to work either, but I took the basic concept and made my own version of this hack.

In this version, you don't have to add the extra parameter '&autonext=true', which should make integration into coppermine much easier.
It worked on my system, which is slightly modified to display in Joomla, but I believe the code changes needed for this mod are independent of my other modifications.




In themes.inc.php, find

function theme_html_rating_box()
{
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $THEME_DIR;
    global $template_image_rating, $lang_rate_pic;


And replace with

function theme_html_rating_box()
{
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $THEME_DIR;
    global $template_image_rating, $lang_rate_pic, $pos, $album;


Same file, find

                '{RATE0}' => "ratepic.php?pic=$pid&rate=0",
                '{RATE1}' => "ratepic.php?pic=$pid&rate=1",
                '{RATE2}' => "ratepic.php?pic=$pid&rate=2",
                '{RATE3}' => "ratepic.php?pic=$pid&rate=3",
                '{RATE4}' => "ratepic.php?pic=$pid&rate=4",
                '{RATE5}' => "ratepic.php?pic=$pid&rate=5",


and replace with:

        '{RATE0}' => "ratepic.php?pic=$pid&rate=0&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE1}' => "ratepic.php?pic=$pid&rate=1&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE2}' => "ratepic.php?pic=$pid&amp&rate=2&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE3}' => "ratepic.php?pic=$pid&rate=3&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE4}' => "ratepic.php?pic=$pid&rate=4&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE5}' => "ratepic.php?pic=$pid&rate=5&pos=$pos&album=$album&cat=".$_GET['cat'],


In file ratepic.php, find

    $location = "displayimage.php?pos=" . (- $pic);


And add directly after it:

    if (isset($_GET['album'])) $location = "displayimage.php?album=".$_GET['album']."&pos=".($_GET['pos'] + 1)."&cat=".$_GET['cat'];


absolutmalmo

Why don't you make this to a real Plugin for coppermine? like you upload it with pluginmgr.php and then easily can get this too work!

Joachim Müller

Quote from: absolutmalmo on September 07, 2006, 09:42:55 PM
Why don't you make this to a real Plugin for coppermine? like you upload it with pluginmgr.php and then easily can get this too work!
Why don't you turn it into a plugin if you're so clever?
Quote from: twistah on March 17, 2006, 10:21:22 AM
Remember; this is a quick-and-dirty hack made to the Coppermine code on my site to speed up the voting process from a users standpoint.


Side-note to all: twistah's instructions say to edit include/themes.inc.php. Although this will probably work, we're not particularly fond of this method. This file should stay unmodified no matter what. Apply the suggested changes to themes/yourtheme/theme.php instead. If you can't find the stuff you're suppossed to edit there, copy it first from themes/sample/theme.php first into your theme.
The reason why we constantly tell users not to modify include/themes.inc.php is simple: it will make updating or upgrading very hard, as you have to re-apply mods every time you upgrade. Subsequently, users who have mods applied shy away from mandatory upgrades (because they are afraid to break things that already work or they don't want to go through the steps to apply their mod again), leaving their galleries outdated and vulnerable.

Joachim


mywedding

Dreams are free, so free your dreams, "Astrid Alauda"

Joerg-Andre

Quote from: Joachim Müller on March 16, 2006, 03:45:35 PM
please post it.
Hallo, kannst du mir vielleicht weiter helfen?
suche aus soetwas wie ein bild voten und dann wird automatisch das nächste angezeigt.
versuche das grad mit der coppermine gallerie v1.58.
irgendwie scheint man hier nicht um forum zu finden auser eion code der aber auch nicht geht..

Joachim Müller

This is an international sub-board where only English postings are allowed. Respect board rules! This thread is for cpg1.4.x galleries anyway, so your reply doesn't fit in. Don't clutter unrelated threads with your issues!

Joerg-Andre

Quote from: trippinsweet on June 26, 2006, 07:42:13 PM
I couldn't get it to work either, but I took the basic concept and made my own version of this hack.

In this version, you don't have to add the extra parameter '&autonext=true', which should make integration into coppermine much easier.
It worked on my system, which is slightly modified to display in Joomla, but I believe the code changes needed for this mod are independent of my other modifications.




In themes.inc.php, find

function theme_html_rating_box()
{
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $THEME_DIR;
    global $template_image_rating, $lang_rate_pic;


And replace with

function theme_html_rating_box()
{
    global $CONFIG, $CURRENT_PIC_DATA, $CURRENT_ALBUM_DATA, $THEME_DIR;
    global $template_image_rating, $lang_rate_pic, $pos, $album;


Same file, find

                '{RATE0}' => "ratepic.php?pic=$pid&rate=0",
                '{RATE1}' => "ratepic.php?pic=$pid&rate=1",
                '{RATE2}' => "ratepic.php?pic=$pid&rate=2",
                '{RATE3}' => "ratepic.php?pic=$pid&rate=3",
                '{RATE4}' => "ratepic.php?pic=$pid&rate=4",
                '{RATE5}' => "ratepic.php?pic=$pid&rate=5",


and replace with:

        '{RATE0}' => "ratepic.php?pic=$pid&rate=0&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE1}' => "ratepic.php?pic=$pid&rate=1&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE2}' => "ratepic.php?pic=$pid&amp&rate=2&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE3}' => "ratepic.php?pic=$pid&rate=3&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE4}' => "ratepic.php?pic=$pid&rate=4&pos=$pos&album=$album&cat=".$_GET['cat'],
        '{RATE5}' => "ratepic.php?pic=$pid&rate=5&pos=$pos&album=$album&cat=".$_GET['cat'],


In file ratepic.php, find

    $location = "displayimage.php?pos=" . (- $pic);


And add directly after it:

    if (isset($_GET['album'])) $location = "displayimage.php?album=".$_GET['album']."&pos=".($_GET['pos'] + 1)."&cat=".$_GET['cat'];



HALLO
it works good when i use coppermine allone.
but i have integratet it in pragma mx an there doesent it works.
why?
can anyone helps me?
PLEASE

Joachim Müller

We don't support PragmaMx. Ask the nice people over at the Pragma support board. Locking.