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]   Go Down

Author Topic: When vote for file... New feature.  (Read 39003 times)

0 Members and 1 Guest are viewing this topic.

trippinsweet

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 27
Re: When vote for file... New feature.
« Reply #20 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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
                '{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:
Code: [Select]
        '{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
Code: [Select]
    $location = "displayimage.php?pos=" . (- $pic);

And add directly after it:
Code: [Select]
    if (isset($_GET['album'])) $location = "displayimage.php?album=".$_GET['album']."&pos=".($_GET['pos'] + 1)."&cat=".$_GET['cat'];
Logged

absolutmalmo

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: When vote for file... New feature.
« Reply #21 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!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: When vote for file... New feature.
« Reply #22 on: September 08, 2006, 07:48:33 am »

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?
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

Logged

mywedding

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 42
  • MyWedding
    • Wedding
Re: When vote for file... New feature.
« Reply #23 on: December 23, 2008, 02:42:06 am »

many thx trippinsweet,

it works, :)
Logged
Dreams are free, so free your dreams, "Astrid Alauda"

Joerg-Andre

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
Re: When vote for file... New feature.
« Reply #24 on: October 22, 2010, 04:47:20 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..
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: When vote for file... New feature.
« Reply #25 on: October 25, 2010, 09:31:39 am »

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!
Logged

Joerg-Andre

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 16
Re: When vote for file... New feature.
« Reply #26 on: October 26, 2010, 10:08:32 am »

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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
                '{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:
Code: [Select]
        '{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
Code: [Select]
    $location = "displayimage.php?pos=" . (- $pic);

And add directly after it:
Code: [Select]
    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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: When vote for file... New feature.
« Reply #27 on: October 27, 2010, 08:21:03 am »

We don't support PragmaMx. Ask the nice people over at the Pragma support board. Locking.
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.046 seconds with 20 queries.