• [Mod] Photo Of The Day 4 0 5 1
Currently:  

Author Topic: [Mod] Photo Of The Day  (Read 269912 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Photo Of The Day
« Reply #45 on: February 22, 2003, 05:09:41 AM »
parent and sub categories uses same template, so there is no way u can separate them, without some changes in .php files.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Photo Of The Day
« Reply #46 on: February 22, 2003, 05:49:31 AM »
i see. and is there a way to clean the top image stats? so i would start counting from 0 every day.

is this possible?

Offline Lord Nite

  • Newbie
  • *
  • Posts: 43
    • View Profile
[Mod] Photo Of The Day
« Reply #47 on: February 22, 2003, 09:58:28 AM »
Quote from: V@no
parent and sub categories uses same template, so there is no way u can separate them, without some changes in .php files.


Figured out that the main category needs at least one image in it before the POTD will show up. :D

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Photo Of The Day
« Reply #48 on: February 22, 2003, 03:47:30 PM »
i was thinking if it's possible to have a direct choice for the POTD, like a url to the thumbnail # or something.

is this possible?
i was thinking on this cause this way i would be able to feature a new pic everyday, even if i have to edit everyday some .php files... i don't mind

thanks

Offline KleinerDrache

  • Newbie
  • *
  • Posts: 46
    • View Profile
[Mod] Photo Of The Day
« Reply #49 on: March 03, 2003, 02:46:41 AM »
Hi,

kann mir jemand sagen was ich ändern muss wenn ich das Pic of the Day auf einer externen seite anzeigen lassen möchte???
Also z.b. auf einer Index Seite die im Hauptverzeichniss liegt!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Photo Of The Day
« Reply #50 on: March 03, 2003, 03:30:37 AM »
Quote from: Bomba
i was thinking if it's possible to have a direct choice for the POTD, like a url to the thumbnail # or something.

is this possible?
i was thinking on this cause this way i would be able to feature a new pic everyday, even if i have to edit everyday some .php files... i don't mind

thanks

not sure if I understand u correctly, but try this:
in the code u added in /includes/functions.php find:
Code: [Select]
           WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND c.cat_id = i.cat_id
Replace with:
Code: [Select]
           WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND c.cat_id = i.cat_id AND i.image_id = XXXXX
where XXXXX is number of your image ID
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Photo Of The Day
« Reply #51 on: March 09, 2003, 11:50:17 PM »
how can i add additional text to my photo of the day?

i mean, i want to add at the details.htm of the choosen image a text by administration saying why was that picture choosen.
this would be a way to mark the difference bettwen the photos of the day and the regular photos.

thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Photo Of The Day
« Reply #52 on: March 10, 2003, 12:39:15 AM »
I'd just edit template  :roll:
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Photo Of The Day
« Reply #53 on: March 10, 2003, 01:11:04 AM »
but how can i edit the details template of that specific image?
if i edit the template it will change all details image id page, right?

 :roll:

Offline SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
[Mod] Photo Of The Day
« Reply #54 on: March 10, 2003, 09:20:13 AM »
V@no saying that you have to add text to potd_image.html template. As an alternative, you can change the text directly in the /lang/main.php
Code: [Select]
$lang['potd_type_rating'] = "Selected by rating... this is the best pi c at my site ever...bla-bla-bla...";

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Photo Of The Day
« Reply #55 on: March 10, 2003, 01:45:25 PM »
but you're not understanding. that's not what i want. i know how to edit the potd_image_html.
what i want is to edit the details.html of that specific image.

when u click on the thumbnail of the potd it will open the details page, with the description, keywords, user comments, ... and i want to add a text saying why was that picture choosen as POTD.


thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Photo Of The Day
« Reply #56 on: March 10, 2003, 02:16:33 PM »
ok, then, u can do this way:
change the code u added into /includes/functions.php to this:
Code: [Select]
//-----------------------------------------------------
//--- Photo Of The Day --------------------------------
//-----------------------------------------------------

function get_potd_image($show_link = 1) {
    global $site_template;
   $potd_image = get_potd_id();
   $template = 'potd_image';
   show_image($potd_image, "", $show_link);
   $potd_image = $site_template->parse_template($template);
   return $potd_image;
}
function get_potd_id() {
   global $site_db;
switch (POTD_SELECT_MODE) {
   case "by_rating"   : $select_mode = "i.image_rating"; break;
   case "by_votes"      : $select_mode = "i.image_votes"; break;
   case "by_comments"   : $select_mode = "i.image_comments"; break;
   case "by_downloads"   : $select_mode = "i.image_downloads"; break;
}

$cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");

    $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.", "user_name")."
            FROM ".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c
            LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
            WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND c.cat_id = i.cat_id
            ORDER BY $select_mode DESC
            LIMIT 1";

   $potd_image = $site_db->query_firstrow($sql);
   $site_db->free_result();
   return $potd_image;
}
//--- End Photo Of The Day ----------------------------


in details.php find:
Code: [Select]
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "msg" => $msg,

replace with:
Code: [Select]
$potd = get_potd_id();
if ($potd['image_id'] == $image_id) {
$potd_msg = "blah blah blah";
}esle{
$potd_msg = "";
}

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  "potd_msg" => $potd_msg,
  "msg" => $msg,


after that, in details.html template u can use those tags:
Code: [Select]

{if potd_msg}
---------Your html table, any code---------
{potd_msg}
---------Whatever u want----------
{endif potd_msg}
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Bomba

  • Full Member
  • ***
  • Posts: 202
    • View Profile
[Mod] Photo Of The Day
« Reply #57 on: March 10, 2003, 04:25:00 PM »
will this potd message stay on that image details for ever, or just as long as she's the selected potd_image?

'cause i'm selecting my gallery photo of the day everyday, and i would like to leave that message for ever in every single photo of the day that i already had chosen (and each one would have the description why was she selected in details.html)

does this code works that way? or just show the message as long as she's selected as potd?

 :roll:  thanks

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Photo Of The Day
« Reply #58 on: March 10, 2003, 08:00:17 PM »
Quote from: Bomba
or just show the message as long as she's selected as potd?
yes
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Amosnet

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • Bilder verkaufen
[Mod] Photo Of The Day
« Reply #59 on: March 10, 2003, 09:18:32 PM »
Did i miss it?

I need to know how i can show the POTD in an external php page.

Thanks
I love 4images! http://www.fotos-verkaufen.de Fotos verkaufen online Tips und Tricks und http://www.fotoskaufen.de