vBulletin Search Engine Optimization
This is a discussion on Display Users Viewing non-vBulletin Pages in "Online Users" within the Member Articles forums, part of the Focus on Members category; Hi, I had some non-vBulletin pages integrated to the vb database and i wanted to show the users viewing those ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| ||||
| ||||
|
Hi, I had some non-vBulletin pages integrated to the vb database and i wanted to show the users viewing those pages in Online Users so i used this piece of code at the top of the non-vBulletin pages: PHP Code: More information can be found here: How to create your own vBulletin-powered page! (uses vB templates) ----------------------------------------------------------------------------- Let's say you have a page nothing to do with vBulletin & vBulletin database (wordpress pages, external html pages, even pages of your other domains etc...) and you still want to show the page viewers in Online Users of vBulletin. Step - 1 Create a page called 'extra_online_users.php'. Copy these lines in it: PHP Code: Step - 2 Open your non-vbulletin page and copy these lines to the very bottom of your page: (Note: Before </body>) HTML Code: <iframe src="http://www.yourdomain.com/extra_online_users.php" scrolling="no" allowtransparency="true" frameborder="0" width="0" height="0"></iframe> But it will show their location as "Unknown Location". We can fix this of course. Step - 3 Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin Product: vBulletin Hook Location: online_location_process Title: Extra Online Users Process Execution Order: 5 Code: PHP Code: Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin Product: vBulletin Hook Location: online_location_unknown Title: Extra Online Users Unknown Execution Order: 5 Code: PHP Code: If you want to apply this tutorial for more than one page, just create another instance of "extra_online_users.php" and name it like "extra_online_users2.php". Don't forget to add the lines to the plugins and make the name changes. Demo and screenshots: Messenger Blog (a wordpress blog - this image at the footer is called by iframe 'extra_online_users.php')The viewer is displayed as: ![]() Feel free to ask any questions realated to this tutorial. Display Users Viewing non-vBulletin Pages in "Online Users" tutorial by NeutralizeR @ MsXLabs Original thread: Display Users Viewing non-vBulletin Pages in "Online Users" - vBulletin.org Forum |
|
#2
| ||||
| ||||
|
great, this what i need but it is better if there is simpler methode or vbseo can do that in future feature Last edited by basketmen; 02-02-2008 at 10:02 PM. |
|
#3
| ||||
| ||||
| Quote:
Quote:
__________________ Ace Shattock / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. My Personal Sites: New Zealand Forum | vBulletin Modifications and Styles | vBulletin Hosting |
|
#4
| |||
| |||
| Not really related
|
|
#5
| ||||
| ||||
|
will the users appear in the what's going on box?
|
|
#6
| ||||
| ||||
|
#7
| |||
| |||
|
I want to add the latest threads to my homepage which is a tpl(html template) page. How to do that?
|
|
#8
| ||||
| ||||
|
you could do that using an iframe.
|
|
#9
| |||
| |||
|
Thanks. do you have sample code?
|
|
#10
| ||||
| ||||
|
Let's see, I'd start doing a really basic script. Something like: Code: <?php
require_once('./global.php');
$cadena="select * from vb_thread order by lastpost desc limit 0,10";
$getthreads = $db->query_read($cadena);
echo '<div><ul>';
while($thread = $db->fetch_array($getthreads)) {
$title=$thread['title'] ;
$threadid=$thread['threadid'] ;
echo '<li><a href="showthread.php?t='.$threadid.'">'.$title.'<a></li>';
}
echo '</ul></div>';
?>
|
|
#11
| |||
| |||
|
I got following error with the code after putting it on my tpl file: Fatal error: Smarty error: [in pages/homepage.tpl line 147]: syntax error: unrecognized tag: $title=$thread['title'] ; $threadid=$thread['threadid'] ; echo ' '.$title.''; (Smarty_Compiler.class.php, line 439) in /home/sistest/public_html/smarty/Smarty.class.php on line 1095 |
|
#12
| ||||
| ||||
|
you shouldn't paste the code in your tpl, just put it in your vbulletin directory as (for example) lastposts.php and refer it in your tpl as an iframe. <iframe src="/forum/lastposts.php"></iframe> |
|
#13
| |||
| |||
|
Thanks. The posts do display this time in a frame. But when I click a post in the forum it opens within the frame, which is not right. How to make it open in current page? I will PM you the link so that you can see what I mean. |
|
#14
| ||||
| ||||
|
add target="_top" to the link echo '<li><a href="showthread.php?t='.$threadid.'" target="_top">'.$title.'<a></li>'; it should be noted, that using iframes is generally a bad idea, as they are deprecated in xhtml strict. |
|
#15
| ||||
| ||||
|
I'm aware the proper way of inserting such a block should be with an include('/forum/lastposts.php') but without knowing what kind of CMS is used in the frontpage, it may result in trouble. For example, using an include with the code I proposed will break postnuke, because it has a global.php of his own. well, who uses postnuke anymore btw. |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NEWBIE HERE with Issues On Vbseo Sitemap Do Hicky | DieselMinded | General Discussion | 70 | 08-24-2007 04:32 AM |
| Sitemap alırken hata alıyorum :( | erhanerhan_5 | Türkçe | 9 | 11-15-2006 09:44 AM |