The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Anybody help me for member online ip show Profile page
Hello,
Before I use this code for that, but after vB4.1.11 this code not work. Anybody help for reuse this code ? Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="membergetip" active="1"> <title>Get Member IP</title> <description /> <version>1.0.2</version> <url /> <versioncheckurl /> <apm_releasedate>0</apm_releasedate> <apm_author /> <apm_relatedurl /> <apm_extrainfo /> <apm_extraedit /> <dependencies> </dependencies> <codes> </codes> <templates> </templates> <plugins> <plugin active="1" executionorder="5"> <title>Get Online Ip</title> <hookname>member_complete</hookname> <phpcode><![CDATA[if (is_member_of($vbulletin->userinfo, 5) OR is_member_of($vbulletin->userinfo, 6) OR is_member_of($vbulletin->userinfo, 9)) { $getip = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "session WHERE userid=".$userinfo['userid']); $prepared[where] .= '<br />Online IP : <b>'.$getip['host'] . '</b>'; }]]></phpcode> </plugin> </plugins> <phrases> </phrases> <options> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
#2
|
|||
|
|||
Any idea ?
|
#3
|
|||
|
|||
I don't see why that code would stop working. Are you sure the plugin is still enabled (did you disable them for the upgrade then forget to reenable?).
Do you see the "Online IP:" with no ip, or nothing at all? |
#4
|
|||
|
|||
Quote:
I don't know maybe the member_complete location wrong or code is not compatible.But this is still work on vB3.8.x |
#5
|
||||
|
||||
it will not work in 4.x, as the template codes are different and the hooks have different names.
|
#6
|
|||
|
|||
Right, I didn't realize that that the upgrade was from vb3. Still, it looks like the code should work and $prepared is getting registered to a template, so it seems you should be able to use {vb:raw prepared.where} to show it. If you were adding $prepared[where] to a template to get it to display, then you'd have to change it {vb:raw prepared.where}.
|
#7
|
|||
|
|||
Can you help for this ? Becasue I'm not a code exper
|
#8
|
|||
|
|||
I get this error
Parse error: syntax error, unexpected T_STRING in /home/xxxxx/public_html/xxxxx/member.php(633) : eval()'d code on line 4 |
#9
|
|||
|
|||
I installed exactly the product file you posted above on a vb.4.1.11 test site and it works for me. I had to edit the MEMBERINFO template and insert {vb:raw prepared.where} where I wanted it to appear, but otherwise I had no problems.
(The file above should be saved as an xml file then imported from the product manager, right?). |
#10
|
|||
|
|||
My xml is like that
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <product productid="membergetip" active="1"> <title>Get Member IP</title> <description /> <version>1.0.2</version> <url /> <versioncheckurl /> <apm_releasedate>0</apm_releasedate> <apm_author /> <apm_relatedurl /> <apm_extrainfo /> <apm_extraedit /> <dependencies> </dependencies> <codes> </codes> <templates> </templates> <plugins> <plugin active="1" executionorder="5"> <title>Get Online Ip</title> <hookname>member_complete</hookname> <phpcode><![CDATA[if (is_member_of($vbulletin->userinfo, 5) OR is_member_of($vbulletin->userinfo, 6) OR is_member_of($vbulletin->userinfo, 9)) { $getip = $db->query_first("SELECT * FROM " . TABLE_PREFIX . "session WHERE userid=".$userinfo['userid']); {vb:raw prepared.where} .= '<br />Online IP : <b>'.$getip['host'] . '</b>'; }]]></phpcode> </plugin> </plugins> <phrases> </phrases> <options> </options> <helptopics> </helptopics> <cronentries> </cronentries> <faqentries> </faqentries> </product> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|