4images Forum & Community

4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: TIMT on May 09, 2006, 11:02:42 PM

Title: {url_show_user_images} in detail site
Post by: TIMT on May 09, 2006, 11:02:42 PM
Hi

I want to implement a link on the detail site, which shows all pictures of the photografer whom picture is actually shown in the detail site.
(uppss... bad English  :oops:)

{url_show_user_images} doesn't work.

TIMT
Title: Re: {url_show_user_images} in detail site
Post by: martrix on June 14, 2006, 01:29:48 PM
I don't know if it will work as I can't test it (no acces to the source files),
I don't even know if this would be the right way how to do that,
but try this:

Step 1.1
open includes/functions.php
find
Code: [Select]
    $user_name_link = "<a href=\"".$site_sess->url($user_profile_link)."\">".$user_name."</a>";
insert below:
Code: [Select]
    $user_images_link = "<a href=\"search.php?search_user=".$user_name."\">".$lang['pictures']."</a>";
Step 1.2
find
Code: [Select]
$user_name_link = $user_name;insert below
Code: [Select]
$user_images_link = $user_name;
Step 1.3
find
Code: [Select]
"user_name_link" => $user_name_link,insert below
Code: [Select]
"user_images_link" => $user_images_link,
Step 2

open templates/yourtemplate/details.html and insert {user_images_link} where you want to show the user name linked with the search result for all "image owners" uploaded pictures...

Step 3

open lang/yourlang/main.php
and at the end just before ?> add
Code: [Select]
$lang['pictures'] = "Pictures";
Title: Re: {url_show_user_images} in detail site
Post by: TIMT on June 14, 2006, 10:25:09 PM
Hi matrix

the link is not displayed on the detail page.
Title: Re: {url_show_user_images} in detail site
Post by: martrix on June 15, 2006, 11:50:58 AM
That looks like if I did forget something  :wink:
Well, in that case I have to try it again in the evening, when I'll be able to test it :)

Does anything show up after placing {user_images_link}?
Title: Re: {url_show_user_images} in detail site
Post by: TIMT on June 15, 2006, 08:20:06 PM
no, nothing is shown.

thanks for your help  :)
Title: Re: {url_show_user_images} in detail site
Post by: martrix on June 16, 2006, 04:28:45 PM
Please accept my apologize... for some reason I forgot to write another step.

now the added snippet {user_images_link} shoud show up on the details page with the correct link...
Title: Re: {url_show_user_images} in detail site
Post by: TIMT on June 16, 2006, 11:07:46 PM
Great! It works.  :D

What do I have to do when I'd like to show the word "Pictures" instead of the username.
I mean the link should be named "Pictures" instead of the username.
The link "username" direct to the profile.
Title: Re: {url_show_user_images} in detail site
Post by: martrix on June 17, 2006, 12:20:04 AM
That's an easy task. I just refreshed the original posting.

Re-do Step 1.1 and then do step 3
Title: Re: {url_show_user_images} in detail site
Post by: TIMT on June 17, 2006, 09:37:36 AM
Hi matrix

Thanks! That's exactly I was looking for.

TIMT
Title: Re: {url_show_user_images} in detail site
Post by: martrix on June 17, 2006, 10:02:48 AM
You are very welcome  8)
Title: Re: {url_show_user_images} in detail site
Post by: nfprehn on July 27, 2006, 07:42:28 PM
I have come across a bug:

When I as the administrator edit an existing image of another user (e.g. change description...), the user_images_link then points to no or another user account.  :evil:

Does anyone know why this is happening?  8O
Title: Re: {url_show_user_images} in detail site
Post by: V@no on July 28, 2006, 12:38:09 AM
and who is the owner of the image (after the editing)?
Title: Re: {url_show_user_images} in detail site
Post by: nfprehn on July 28, 2006, 11:12:09 AM
Thanks V@no.  I am not sure what you mean.  The image 'user' is still the same.

Here is the link to the offending image:

http://www.lifeofamodel.com/4images/details.php?image_id=20&mode=search
Title: Re: {url_show_user_images} in detail site
Post by: nfprehn on July 29, 2006, 01:34:29 PM
I am trying to take this one further and add the image owner's details (as shown on his profile page) to the details.html .

I cannot get it to show though...  :cry:
Title: Re: {url_show_user_images} in detail site
Post by: V@no on July 29, 2006, 05:11:48 PM
Hmm...the username showed is actualy name of the picture and not the owner's name...unless you did some other changes in the code what martrix posted, then I dont see how is this possible at all...
check the changes again.
Title: Re: {url_show_user_images} in detail site
Post by: nfprehn on July 29, 2006, 10:05:15 PM
Hi V@no

I have checked the code again, and I did exactly as above.

I have two different phenomena:

1.  I added a comment to the following picture as user "kelly", and then (perhaps whilst still logged in as kelly) I replaced the main image (there was no image, just a thumbnail) which had disappeared as a result of a failed resize.

http://www.lifeofamodel.com/4images/details.php?image_id=20&mode=search


2. I have this picture, where the link just leads to http://www.lifeofamodel.com/4images/ 
    Again, I have no idea why that is happening.  All the other photos of that user have a working link underneath.

http://www.lifeofamodel.com/4images/details.php?image_id=93&mode=search


This is what I have in details.html:
[qcode] <div align="center">
                {image}
                {if admin_links}<br />{admin_links}<br />{endif admin_links}
<br /><a href="{url_show_user_images}">Display {owner_name}'s portfolio</a><br />
                <br />{lightbox_button}&nbsp;&nbsp;{postcard_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{download_button}&nbsp;&nbsp;{download_zip_button}
              </div>
[/qcode]

Thanks a lot for your help, V@no.