Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 01 Feb 2019, 09:24
BulliM's Avatar
BulliM BulliM is offline
 
Join Date: Oct 2017
Userid in PHP-Module

I've extended user profile site with a PHP-Module, which includes a php file. In this file I need to compare two variables.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

First variable is userid from user, who visits the profile. Second is whos profile you watch.

In my script, second variable is empty. How can I get access to user profiles userid in my included PHP-Script?

--------------- Added 01 Feb 2019 at 17:05 ---------------

Frustrating.

Last edited by BulliM; 01 Feb 2019 at 11:52. Reason: Found out, page['userid'] is the right name
Reply With Quote
  #2  
Old 03 Feb 2019, 05:09
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
The userid of the profile being viewed is not available in the $vbulletin variable. Just extract and parse it from the current profile URL.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #3  
Old 03 Feb 2019, 07:17
BulliM's Avatar
BulliM BulliM is offline
 
Join Date: Oct 2017
Originally Posted by noypiscripter View Post
The userid of the profile being viewed is not available in the $vbulletin variable. Just extract and parse it from the current profile URL.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Nice solution.

Because profile userid is available in $vbulletin->scriptpath, my solution was:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Kind of the same way, but also differently.

Last edited by BulliM; 03 Feb 2019 at 07:25.
Reply With Quote
  #4  
Old 03 Feb 2019, 18:14
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Aug 2013
What does scriptpath return? Can you give an example?
__________________
Glenn Vergara, an ex-vB Developer, now a vB Mod Developer

GIPHY for vB5 | AutoLinker | Video Attachments Player | New Registered Users Module | Clear System Cache Cron | DragNDrop Upload | Topic AJAX AutoUpdate | Force Read Topic
Reply With Quote
  #5  
Old 03 Feb 2019, 18:27
BulliM's Avatar
BulliM BulliM is offline
 
Join Date: Oct 2017
Originally Posted by noypiscripter View Post
What does scriptpath return? Can you give an example?
/member/123-username
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add-On Releases Subscribed/Favorite Forums Module [vba CMPS module] Skedoozy vBulletin 3.6 Add-ons 17 13 Apr 2008 15:25
Module CMPS: Custom Welcome module corn dog vBulletin 3.5 Add-ons 8 02 Jun 2006 18:10



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

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


New To Site? Need Help?

All times are GMT. The time now is 01:07.

Layout Options | Width: Wide Color: