1
rajaito
XCGAL: post a direct link to gallery from users profile
  • 2005/6/7 19:57

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


Hi there....

I'd like to add a simple link on each users profile that takes you directly to their gallery.

ie: "View %'s gallery"


(I have disabled the default list of recent galleries and forum posts, etc that is listed at the bottom of each user's profile because of two reasons: 1.Clutter | 2.batch photo uploads will not show a title or create a link for the gallery module)

Therefore a simple link to their main gallery will be fine.
I look forward to your responses.

(BTW... I cant seem to find any official support for XCGAL)

2
rajaito
Re: XCGAL: post a direct link from users profile
  • 2005/6/7 23:54

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


I really would like to see this work. Any takers?

3
ChowSinWon
Re: XCGAL: post a direct link from users profile
  • 2005/6/8 18:08

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


hey there.

i just implemented, what you asked for...it's a small hack for XOOPS version 2.0.10.

i modified following files:
/userinfo.php
/language/english/user.php
/modules/system/templates/system_userinfo.html

following lines i added to /userinfo.php after line with
$xoopsTpl->assign('lang_notregistered', _US_NOTREGISTERED);
$xoopsTpl->assign('lang_gallery'_US_GALLERY);
if(
file_exists(XOOPS_ROOT_PATH '/modules/xcgal/albums/userpics/' . (10000 $thisUser->getVar('uid'))))
    
$xoopsTpl->assign('user_gallery''<a href="' XOOPS_URL '/modules/xcgal/index.php?cat=' . (10000 $thisUser->getVar('uid')) . '">' _US_GALLERY '</a>');
else
    
$xoopsTpl->assign('user_gallery''--');


in /language/english/user.php i added a constant after
define('_US_SHOWALL','Show All');
(you have to add this constant for other languages, too, if you use any):
define('_US_GALLERY','Gallery');


and lastly, i modified the template /modules/system/templates/system_userinfo.html by adding following lines like this:
<tr valign="top">
          <
td class="head"><{$lang_extrainfo}></td>
          <
td class="odd"><{$user_extrainfo}></td>
        </
tr>

        <!-- 
start of new code -->
        <
tr valign="top">
          <
td class="head"><{$lang_gallery}></td>
          <
td class="odd"><{$user_gallery}></td>
        </
tr>
        <!-- 
end of new code --> 

      </
table>


that worked quite nice for me. maybe you can use that, too.

i have to point out, that this is a hack to the core system, so if you update your XOOPS after that hack, these modifications might become erroneous!

greetings,
ric

4
rajaito
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 8:59

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


that worked excellent!

Now if I could just make it say "View(username)'s Gallery".

I tried plugging i <{$user_name}>'s but it only sort of worked. Any ideas Ric?

5
rajaito
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 9:03

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


And maybe just maybe you might know the answer to a similar question I have about our download section. I posted it here:

http://www.wf-projects.com/modules/ipboard/index.php?act=ST&f=11&t=1168&s=5d639643f5fc9d397961c8ce37c85589

6
ChowSinWon
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 10:15

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


Quote:

rajaito wrote:
Now if I could just make it say "View(username)'s Gallery".


no problem:
add a new constant to the language-file (/language/english/user.php)
define('_US_VIEWGALLERY',"View %s's Gallery");

and in /userinfo.php you exchange the first long line of my new ones by this one:
$xoopsTpl->assign('user_gallery''<a href="' XOOPS_URL '/modules/xcgal/index.php?cat=' . (10000 $thisUser->getVar('uid')) . '">' sprintf(_US_VIEWGALLERY$thisUser->getVar('uname')) . '</a>');

and voilĂ 

ric

7
ChowSinWon
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 10:39

  • ChowSinWon

  • Just popping in

  • Posts: 6

  • Since: 2005/3/17


Quote:

rajaito wrote:
And maybe just maybe you might know the answer to a similar question I have about our download section. I posted it here:

http://www.wf-projects.com/modules/ipboard/index.php?act=ST&f=11&t=1168&s=5d639643f5fc9d397961c8ce37c85589


i am sorry, but i do not use wf-downloads. maybe i'll try it sometime, but not right now.

ric

8
rajaito
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 20:19

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


Wow... You are on a roll!!! Thank you soooo very much. I also have a few more questions for you or anyone else about this gallery.....

1. Any chance that you know how to display how many photos each user has in that same line on their profile?

The line that is displayed on the gallery page says something like: "4263 pictures in 62 albums viewed 8067 times"

2. Do you know how to add a text input box under each photo that allows the owner of that photo to edit the caption? I saw this on a gallery once and it was really useful.

9
rajaito
Re: XCGAL: post a direct link from users profile
  • 2005/6/9 20:26

  • rajaito

  • Not too shy to talk

  • Posts: 109

  • Since: 2005/1/3 1


Also... I don't know if you noticed how much I hacked xcgal.... but I thought I'd point out how I force users to remain in admin mode because I thought it was way too confusing. Don't ask me how I did it though.... I can't even remember now!! Ha ha... But I thought you might think that was a neat idea.

Cheers.

Login

Who's Online

166 user(s) are online (97 user(s) are browsing Support Forums)


Members: 0


Guests: 166


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits