Author Topic: Zusätzlichen Link in Thumbnailübersicht  (Read 9101 times)

0 Members and 1 Guest are viewing this topic.

Offline Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Zusätzlichen Link in Thumbnailübersicht
« on: March 14, 2003, 09:22:07 PM »
Hallo,

ich würde gerne in die Thumbnailübersicht den HP-Link des User mit anzeigen lassen.
Ich habe also die thumbnail_bit.html um folgendes erweitert
Code: [Select]
{if user_homepage}{user_homepage}{endif user_homepage}
Das ganze sieht bei mir jetzt so aus:
Code: [Select]
{thumbnail}
{image_name} {if image_is_new}{lang_new}{endif image_is_new} ({user_name_link})
{if user_homepage}{user_homepage}{endif user_homepage}
{cat_name}
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}
{lightbox_button}

Und es funktioniert nicht. An der Stelle, an der die HP-Url erscheinen soll, hab ich nur eine leere Zeile. Viellecht kann mir jemand einen Tipp geben?

Danke
Peter

Offline Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Zusätzlichen Link in Thumbnailübersicht
« Reply #1 on: March 15, 2003, 02:16:23 PM »
Hello,

maybe it´s better to write in english....but my english is very bad  :?
Ok...lets try. I like to add a homepage-link of every user (only if he has a  homepage) to the Thumbnail overview.
I edit the thumbnail_bit.html and add this:
Code: [Select]
{if user_homepage}{user_homepage}{endif user_homepage}

Bow it looks like this:
Code: [Select]
{thumbnail}
{image_name} {if image_is_new}{lang_new}{endif image_is_new} ({user_name_link})
{if user_homepage}{user_homepage}{endif user_homepage}
{cat_name}
{if allow_comments}{lang_comments} {image_comments}{endif allow_comments}
{lightbox_button}


But it does not work. I have just an empty row where the HP-link should be. Can someone help me? What else must i do. Maybe first get the information from database....but witch page i have to edit?
Or is there a mod or hack for HP-link at the Thumbnails.
Is there a way to show the HP-link and other User details under the full size image?

Thanks a lot
Peter

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
Zusätzlichen Link in Thumbnailübersicht
« Reply #2 on: March 15, 2003, 03:56:05 PM »
yes, u are right, by default, 4images doesnt pull out of database user homepage information.
I'll give u an example how u can add user_home page in "details view":
open details.php
find:
Quote
$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".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."

replace with:
Quote
$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".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_homepage")."


then, u'll need register it in the template:
find:
Code: [Select]
 "msg" => $msg,
insert this:
Code: [Select]
 "user_homepage" => $image_row['user_homepage'],

so, probably also u'll need do so in /includes/functions.php
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 Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Zusätzlichen Link in Thumbnailübersicht
« Reply #3 on: March 15, 2003, 06:02:31 PM »
Thanks a lot for your answer  :D
I try what you wrote but it does not work :(

Is the members.php the only page that shows HP-Link from Users?
I found this part in members.php
Quote
}

  if ($user_row = get_user_info($user_id)) {
    $user_homepage = (isset($user_row['user_homepage'])) ? format_url($user_row['user_homepage']) : REPLACE_EMPTY;
    if (!empty($user_homepage) && $user_homepage != REPLACE_EMPTY) {
      $user_homepage_button = "<a href=\"".$user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$user_homepage."\" /></a>";
    }
    else {
      $user_homepage_button = REPLACE_EMPTY;
    }

Maybe this is what i need for the other files?
Sorry....i just startet with editing scripts  :?
I hope you can help me.I need the HP link in the thumbnail-overview and the Details at the image (where the Username is displayed).

Thanks again.
Peter

Offline Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Zusätzlichen Link in Thumbnailübersicht
« Reply #4 on: March 16, 2003, 02:09:36 AM »
Just to show you what i need:
http://haunter.student.utwente.nl/Terrarevolution/galleries/index.php in the overview is the "Album" button and next to it a "Homepage" button.
And then on Details page:
http://haunter.student.utwente.nl/Terrarevolution/galleries/details.php?image_id=1783&sid=00f7402dbbaabf30b495d8438beabc52
This part
Quote
By: pmermino
Gallery: Vue d'Esprit
Display all images by: pmermino
http://www.paroge.com/vde


Can someone please help me? I allready ask Vraxor (Webmaster of this page) but he can´t help me.

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
Zusätzlichen Link in Thumbnailübersicht
« Reply #5 on: March 16, 2003, 02:26:05 AM »
the code I posted above should work for this:
http://haunter.student.utwente.nl/Terrarevolution/galleries/details.php?image_id=1783&sid=00f7402dbbaabf30b495d8438beabc52

then, open /includes/functions.php
Find:
Code: [Select]
   "image_id" => $image_row['image_id'],
    "user_id" => $image_row['user_id'],
    "user_name" => $user_name,

add after:
Code: [Select]
   "user_homepage" => (isset($image_row['user_homepage'])) ? format_url($image_row['user_homepage']) : REPLACE_EMPTY,

open index.php
Find:
Code: [Select]
$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".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
Replace with:
Code: [Select]
$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".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_homepage")."
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 Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Zusätzlichen Link in Thumbnailübersicht
« Reply #6 on: March 16, 2003, 02:46:14 AM »
Thanks again.

I changed all but there is one thing i can´t change:
Quote from: V@no
then, u'll need register it in the template:
find:
Code: [Select]
 "msg" => $msg,
insert this:
Code: [Select]
 "user_homepage" => $image_row['user_homepage'],


i can´t find
Code: [Select]
"msg" => $msg,

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
Zusätzlichen Link in Thumbnailübersicht
« Reply #7 on: March 16, 2003, 02:52:08 AM »
ok, then, look for:
Code: [Select]
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(

add that code after it ^
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 Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Zusätzlichen Link in Thumbnailübersicht
« Reply #8 on: March 16, 2003, 03:20:04 AM »
Sorry..i searched on the wrong place. Now i got it. Thnaks a lot :D

After i edit all pages like you told me...i edit the details.html in templates

I insert the red part
Quote
{image} {if admin_links}<br />
                      {admin_links}<br />
                      {endif admin_links}<br>
                      Von: {user_name_link} &nbsp;&nbsp; Homepage: {if user_homepage}<a href="{user_homepage}" target="_blank">{user_homepage}</a>{endif
                      user_homepage}<br />

                    <p>{lightbox_button}&nbsp;&nbsp;{postcard_button}&nbsp;&nbsp;{download_button}&nbsp;&nbsp;{download_zip_button}

Still there is nothing. Look here: http://www.terradreams.de/gallery/details.php?image_id=65&sessionid=b58272488092b241a04a03d3ce64b690
I also tryed only
Code: [Select]
{user_homepage} ....nothing.
I opened all files again.....and all is done like you wrote.

Offline Neo1

  • Full Member
  • ***
  • Posts: 202
    • View Profile
    • http://www.terradreams.de/
Zusätzlichen Link in Thumbnailübersicht
« Reply #9 on: March 16, 2003, 03:26:05 AM »
Sorry...forget about it. The User just got no HP  :roll:
It works fine now. Thanks a lot for your time  :D

Can i do this changes also to the thumbnail_bit.html like on the page i show you?

(edit) It works. I just add
Code: [Select]
get_user_table_field(", u.", "user_homepage").to the categories.php

Here you can see it in action: http://www.terradreams.de/gallery/

Thanks again.

Peter