Slider Plugin Modification.. Slider Plugin Modification..
 

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

Slider Plugin Modification..

Started by mr.bena, April 04, 2012, 06:09:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr.bena

Hi, I have to set one of my albums for the slider and as the current slider does not implement this and only offers "Last Upload, Random, Top Rated, Most Viewed", I add some extra code manually.. as follows;-


Quoteplugin_config.php
********************************************************
I ADD

<option value="model" <?php if($SLIDERSET['slider_album'] == "model") echo 'selected="selected"';?>><?php echo 'The Best Models'?></option>

Just below..

<option value="toprated" <?php if($SLIDERSET['slider_album'] == "toprated") echo 'selected="selected"';?>><?php echo $lang_meta_album_names['toprated']?></option>

********************************************************

Quotecodebase.php
********************************************************
I ADD

// request string for album Model pics

  else if ($SLIDERSET['slider_album'] == "model")
  {
     $slider_query = "SELECT * FROM {$CONFIG['TABLE_ALBUMS']} AS p WHERE aid=3 AND filename like '%.jpg' AND filename not like 'youtube_%' $slider_FORBIDDEN_SET $META_ALBUM_SET ORDER BY RAND() LIMIT $sliderlimit";
  }

Just below..

else if ($SLIDERSET['slider_album'] == "lastup") {
    $slider_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' $slider_FORBIDDEN_SET $META_ALBUM_SET ORDER BY pid DESC LIMIT $sliderlimit"; 
  }
********************************************************

Now, I could see another extra option called "The Best Models" and when I click the summit button, the value is updated successfully... However, when I try to see the result on the main page, it says "There was an error while processing a database query" .

Please, kindly give me some suggestion... I am really in need to make this working..

Αndré

Please enable debug mode and post the extended error message. I guess it will work when you change
{$CONFIG['TABLE_ALBUMS']}
to
{$CONFIG['TABLE_PICTURES']}

mr.bena

Hi, Andre.. You are absolutely right! Thank you very much! The problem is partially solved, however, I do not know how to show the sliding description. For example, if it is "Top Rated", above the sliding pictures the text "Top Rated" is shown, and if it is "Random Files", The the text "Random Files" is displayed. Now that I used Models album and I want to show the text "Models" above the sliding pictures, do you have any idea how could I achieve this? I will try to figure out at the same time..

Αndré

As I don't know the plugin nor investigate its code, you should search the whole plugin's code for
starttable

The second parameter is the table's caption.