The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to display homepage in memberinfo_profilefield_category?
I want to show homepage URL set by users in template memberinfo_profilefield_category (under all profile fields.) I've tried using conditions:
<vb:if condition="$show['homepage']"> <vb:if condition="$prepared['homepage']"> But one of them displayed the content even if the user of currently viewed profile has set their homepage. Any advices? |
#2
|
||||
|
||||
Perhaps the $show variable isn't available for use in that template. Did you take a look at the code and see? I just took a look and the only variable registered for use in that template is $category. Did you try that?
|
#3
|
|||
|
|||
Well, I don't really know where to find such information so I just copied pieces of code from other templates in a hope that it would work but for the reason you mentioned it didn't.
Using $category as a variable also doesn't help. I also tried pasting these conditions into other MEMBERINFO templates but without any luck. How to make it work? |
#4
|
||||
|
||||
If $show[homepage] is a real variable, then it could be that $show isn't registered. Try using something like $show[member] (will only show to logged in members) and see if it works and then you will know if $show works there. If it doesn't, then that means the variable isn't registered. If it does work, then that means $show[homepage] isn't defined. So, we need to know which it is.
|
#5
|
|||
|
|||
$show[member] is works, thus $show[homepage] isn't defined. What would you suggest to do about it?
|
#6
|
||||
|
||||
You'll need to write a plugin to define it before you can use it.
|
#7
|
|||
|
|||
I have not any experience with that, could you please tell me what code should be there or where can I find more relevant information?
|
#8
|
||||
|
||||
I would try using the hook just above the code for the template which is member_profileblock_profilefield_category and perhaps set the $show variable based on $this->profile->prepared['homepage'] which is mentioned in that page (class_profileblock.php) also.
|
#9
|
|||
|
|||
I tried using $show['homepage'] = $this->profile->prepared['homepage']; in my plugin but it didn't work ( <vb:if condition="$show['homepage']"> was not executed). I am not sure if I understood what you meant.
//This actually made some links from my navbar disappear, heh |
#10
|
|||
|
|||
I'm not sure what you're trying to do, are you trying to display the homepage only if a user has one entered? Maybe try this:
Code:
$show['homepage'] = !empty($this->profile->prepared['homepage']); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|