The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Link to member profile
Hi,
I want to modify the link of members from the home page (those with last posts) from http://www.example.com/forum/member....tposter&t=1652 to their profiles, eg www.example.com/forum/member.php?u=256 I've tried to modify in forumhome_lastpostby, but it didn't work, because I don't have $userinfo[userid] defined there. |
#2
|
||||
|
||||
You can't do that easily. When someone clicks on the link, the forumid is passed and the lastposter *at that moment* is looked up and you are sent to their member.php page. The last poster can change between when a page is spit out and when a user clicks on that link.
|
#3
|
|||
|
|||
Thanks Lynne. After I've read your post, I've made the following changes (I'm not a programmer so please don't laugh)
I've replaced in forumhome_lastpostby: PHP Code:
PHP Code:
Can somebody enlight me? --------------- Added [DATE]1247658203[/DATE] at [TIME]1247658203[/TIME] --------------- If nobody have a clue about the stuff above, maybe you can help me to solve another issue; in this case I don't need to solve the problem in the previous post. I wanted different meta description and keywords for members. So I've made the following changes: I've made a new plugin in global_start hook: PHP Code:
PHP Code:
But when I call, for example: http://www.example/forum/member.php?...astposter&f=43 I have this message in a blank page: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" I thought that if I choose another hook for my plugin, it works. But which hook? I've tried different hooks but none of them was right. Any clue on this? --------------- Added [DATE]1247658982[/DATE] at [TIME]1247658982[/TIME] --------------- Ok, while I wrote the above issue, I had an enlightened moment and I've solved the problem. I've changed the if statement: PHP Code:
|
#4
|
||||
|
||||
I don't know why you should have to do any query. If you go to view Member X's member.php page, you should be able to use the variable $userinfo[username] to get Member X's username without doing any query. That variable should already be available for use.
|
#5
|
||||
|
||||
They already have username, no? So why not do member.php?username=$lastpostinfo[lastposter]
Or if not, try lastposterid or lastpostuserid |
#6
|
|||
|
|||
@Lynne: I was able to use $userinfo[userid] in <title>, but in headinclude, for meta description and keywords, userinfo isn't available.
@Gio~Logist: the member's page is called with: member.php?u=$userinfo[userid] I didn't find in any table the fields lastposterid or lastpostuserid. It would have been easier if there had been. |
#7
|
||||
|
||||
Gio is correct in that you can also call the member page using the username - member.php?username=xxxx so you may want to try his method.
|
#8
|
|||
|
|||
Yes, it works. I can call a member like you said, but I have to do another changes to have username in description an keywords, so I'll leave my version.
Thank you all for your answers. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|