![]() |
How can I create Friends widget on the home page
1 Attachment(s)
Hello,
I need to create a widget on the home page that shows my friends like the widget on my profile. But I don't know how. Can anyone help me with this :) I just need to know the code that I can use on the widget to show my friends (Maybe limit the friends widget to show 6 friends only). I attached an image for the widget that I want to create one like it on the home page. Thanks a lot, |
You could show up to 6 random friends like this:
Code:
global $vbulletin; |
Thank you kh99 for your reply. But could you please teach me how to add your code in widget on the home page. Because I created a new HTML static widget and I paste your code into the widget but when I browsed the Home Page I found the widget shows your code as it is. So I replaced the HTML Static widget with PHP Direct Execution widget and when I browsed the Home Page I found the date of today showing up only in the widget.
Can you help me please. I don't know where's the problem. |
The php direct execution widget should work. By default the "configure" text area has a sample line of code that displays the date. You need to make sure you remove that.
|
Hi kh99,
You are absolutely right. I used php direct execution widget and I replaced the code for the date with your code and the widget works fine now. But is there any chance to list the names of my friends with their profile photos as in the friends widget in my profile (see the attached image in the first post)?? |
I've started working on something like that. Hopefully it won't take too long (and hopefully I'll actually finish :) ).
|
A million thanks to you Kh99. I wish you best of luck with the developing of this widget.
I'll keep monitoring your progress with joy! |
very good !
|
To show all your friends online in a widget you would use this:
Code:
global $vbulletin; |
lol, I guess I never did finish this. Anyway, I haven't tried it but I think something like this should work:
Code:
global $vbulletin; |
I am gonnah cry from joy! lol ...Works great kh99 thank you once again !
Just a quick note, you must include at the very top of the code the following if not the widget will not show up. global $vbulletin; |
Quote:
Thanks, I added it above. I guess I missed it when I copy/pasted the code. |
Yeerp, thank you kh99 once again my Man you rock!
|
Could this be turned into a forum block too? If so, how?
|
All times are GMT. The time now is 05:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|