PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Classifieds Support > Classifieds How do I...?

Classifieds How do I...? Wondering how to do something in Classifieds?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old July 28th, 2012, 01:05 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Mar 2004
Location: MA
Posts: 170
Fetching Usergroupids

I was trying to fetch the usergroupid from the user table and found that all of the usergroupids are set to "0", lol. Does photopost store the usergroupids from vbulletin anywhere or do I need to do some sort of join to compare the $iuserid (showproduct.php) to that of a vbulletin user and fetch it that way?
iguanairs is offline   Reply With Quote
Old July 28th, 2012, 09:26 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,698
If your integrated with a forum the usergroups come from that forum not classifieds. If your trying to do something outside the parameter of the program then you need to do some sort of code mod.

Anything we need in our program is performed through a function so the only time we do a users usergroups permissions is when a user is viewing the classifieds groups from the forum are not stored.

All that stuff is grabbed like userid,username,usergroupid etc when a user is authenticated.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old August 2nd, 2012, 03:42 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Mar 2004
Location: MA
Posts: 170
I know you don't typically help with mods Chuck but I was hoping you would be able to see what I am doing wrong since I simply can't figure it out and have been working on it since I posted this. lol

I was able to grab the membergrouid from vbulletin easily on the showproduct template since the posters userid doesn't change using this query:

Code:
Content visible to verified customers only.
I am attempting to do the same thing on the showcat page where the list of ads are found. i am finding that it is not as easy as the showproduct page.

Fetching the users ID for an posted is very easy using either {$gallery['userid']} or $tuserid.

This doesn't produce a result though:

Code:
Content visible to verified customers only.
I am thinking I have to loop it to the product array somehow but I am ignorant with mysql queries and can't figure it out. if you could give me some guidance or direction I could at least research how to do it knowing I am heading in the right direction.
iguanairs is offline   Reply With Quote
Old August 2nd, 2012, 07:10 PM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,698
You are correct we do not assist with code mods.

I will point out a couple things though.

1. you do not need to add vb code to our files simply do a regular query like our page.
2. you are not grabbing the main group either.

this might work but I can offer no other advise as I have never tried this. This query and code should obviously be below where we define $iuserid in showproduct.php

Code:
Content visible to verified customers only.
You can then do something like this in the showproduct template where you want it to display. My example checks for say group 10 as an example and prints some html

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old August 3rd, 2012, 06:25 AM   #5 (permalink)
Member
Verified Customer
 
Join Date: Mar 2004
Location: MA
Posts: 170
Thanks Chuck but I already have the showproduct page working using this:

Code:
Content visible to verified customers only.
That code above works great on the showproduct page because the user ID is constant. I am trying to get it to work on the showcat page. I am still going to try the code you posted since my attempts on the showcat page have failed.

Thanks!
iguanairs is offline   Reply With Quote
Old August 3rd, 2012, 06:32 AM   #6 (permalink)
Member
Verified Customer
 
Join Date: Mar 2004
Location: MA
Posts: 170
This is where you construct the output for the showcat page:

Code:
Content visible to verified customers only.
I am trying to get just the membergrouid to show for the person who posted the ad. The usergroup I am trying to see is a secondary usergroup which is the membergroupid field. The showcat page is the only one I am having an issue with because the userid changes with each listing.
iguanairs is offline   Reply With Quote
Old August 3rd, 2012, 09:09 AM   #7 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,698
Like I stated I do not assist with code mods. I just posted an example above because there is no loops needed as your only querying one user on showproduct.

In showcat look at the code your posting the userid of the poster is clearly defined as $tuserid and you will need to do two things. issue any query in the showcat while look and define any result maybe this.

Code:
Content visible to verified customers only.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old August 3rd, 2012, 12:02 PM   #8 (permalink)
Member
Verified Customer
 
Join Date: Mar 2004
Location: MA
Posts: 170
Thanks man, that worked! I have been pounding my head on this. I greatly appreciate the help!
iguanairs is offline   Reply With Quote
Old August 3rd, 2012, 03:04 PM   #9 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,698
enjoy your weekend.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fetching for index Gacey Before You Buy 1 April 8th, 2007 04:42 PM


All times are GMT -5. The time now is 09:55 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0