Author Topic: Put a specific gallery link in users left panel?  (Read 6489 times)

0 Members and 1 Guest are viewing this topic.

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Put a specific gallery link in users left panel?
« on: April 19, 2003, 10:50:09 PM »
I've got my system where when  a user registers I create a gallery and set the permissions for only them to upload to it. (This is all done manually so theres no need to ask for how I do it automated, I dont  :oops: )

What I would like to do is to put a link on the left side of the page that says, My Gallery and have it linked to their specific gallery, is there an easy way of doing this?

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Put a specific gallery link in users left panel?
« Reply #1 on: April 21, 2003, 05:33:24 PM »
Im thinking there must be an easy way of doing a standard href link, or using a form of sorts that would take their username and be able to link it straight to their gallery, but Im not seeing it for some reason.

Anyone?

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Put a specific gallery link in users left panel?
« Reply #2 on: April 23, 2003, 07:05:12 PM »
I looked, but didnt find it. I found his new User create category mod, but until I find out if thats compatible with the user limit mod, Im not doing it.

The closest I've been able to come is to use the search feature, and do a hyperlink using their username to see their images, but then they have to click on their username under the images shown to them as theirs to get to their gallery.

There has to be an easy variable that Im missing that will translate their username to their category, so I can just put a hyperlink on the left user_logininfo template to their specific gallery.

Offline lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
v@no?
« Reply #3 on: April 24, 2003, 03:04:08 AM »
Have you done this yet? I went to your site, and see that you search link to the users photos to show them all their photos on the sytstem, but not a direct link to their particular category.

Im thinking a query of the database to see what category they have permission in, then return that as a variable that can be used in templates? Maybe?

On my particular system, each user has a category named after them, and only they can upload to that category.  So Im thinking to query the database to find which category has them assigned to it, then return that category number so it can be used in a text hyperlink.

What do you think?

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
Put a specific gallery link in users left panel?
« Reply #4 on: April 24, 2003, 03:56:39 PM »
Quote from: lakeside
I looked, but didnt find it. I found his new User create category mod, but until I find out if thats compatible with the user limit mod, Im not doing it.

The closest I've been able to come is to use the search feature, and do a hyperlink using their username to see their images, but then they have to click on their username under the images shown to them as theirs to get to their gallery.

There has to be an easy variable that Im missing that will translate their username to their category, so I can just put a hyperlink on the left user_logininfo template to their specific gallery.

yes, its all possible (as I said many times already: "almost nothing is not possible when u have PC" ;))
If I understud u correctly, u want have username displayed in memberlist or under thumbnails that will point not to user profile page, but directly to their category? sure, it's possible to do.
also, because of size of the mod I didnt include some usefull stuff such as:
1. under ACP admin can not just see ID of user's MPC but can chose from dropdown menu the category he want to asign for the user.
2. when admin go to user's profile page it shows link to edit permission for the user. From there u can BAN that user from that category.
this feature still avalable if u use this address:
http://yoursite/member.php?action=usercatpermedit&user_id=XXXXX
where XXXXX is user 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 lakeside

  • Full Member
  • ***
  • Posts: 123
    • View Profile
Put a specific gallery link in users left panel?
« Reply #5 on: April 24, 2003, 05:17:47 PM »
No, I think were missing something here in translation  :oops:

What I'd like to see is:

When the user registers, I assign a category to that user, and set the upload permissions to private.  Then I edit the user and give him permission to upload to his category.

Now, when a user logs in, and the user_logininfo.html template is used, I want to place a simple text hyperlink that says:
My Gallery, that will link directly to the gallery that he has permission to upload to.  If it's any help, the category, and username are always the same.  But it seems that to use the category.php file, you have to have the user id, and I can't seem to get that variable anywhere.

When I place
{user_id} into the user_logininfo.html template, it always brings back the number 16, if I use {user_name} I always get the name of the first category "Showcase".

I was thinking something simple like:
/categories.php?user_name={user_name} then it could query the category database to find the category with the same username.

This seems pretty simple in concept, but Im at a total loss as to how to actually accomplish this.

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
Put a specific gallery link in users left panel?
« Reply #6 on: April 24, 2003, 05:33:10 PM »
I only can say that this possible with my mod...or as u said with extra queriing db:
Code: [Select]
    $sql = "SELECT cat_id, cat_name
         FROM ".CATEGORIES_TABLE."
         WHERE cat_name = ".$user_id;
     $user_category = $site_db->query_firstrow($sql);

after that u'll have your category ID in $user_category['cat_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)