Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-08-2009, 03:48 PM
soundbarrierpro soundbarrierpro is offline
 
Join Date: Nov 2007
Posts: 767
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default WOL variable in VBPowered Pages

Will this work if added to the template of a vbpowered page?

Basically, I want the who's online block added on pages I create.

Thank you

--------------- Added [DATE]1239210886[/DATE] at [TIME]1239210886[/TIME] ---------------

@ Lynne

I found your article, I am using Gary Kings vbpowered pages. I have about 70 working pages

but when I add the code changes into the index.php everything goes haywire.

I don't get the "Add this" to the "Start and End"

I put the "Start" code right under this:
// ### LOGGED IN USERS #################################################


and I put the "End" code right before this:
// ### MAX LOGGEDIN USERS ################################

When I load the page, I get an error at line 540 message
Reply With Quote
  #2  
Old 04-08-2009, 05:15 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to copy the code from your index.php file from where I say Start to where I say End. You add all that code to your page.
Reply With Quote
  #3  
Old 04-08-2009, 05:46 PM
TNCclubman's Avatar
TNCclubman TNCclubman is offline
 
Join Date: Sep 2008
Posts: 690
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We should have a subforum for people to share additions they made for their vb powered pages. I think it would be really useful for everyone to share ideas that we've been able to get to work.
Reply With Quote
  #4  
Old 04-08-2009, 05:49 PM
soundbarrierpro soundbarrierpro is offline
 
Join Date: Nov 2007
Posts: 767
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, ok. Made the change.

Here's what I get on my page. Nothing shows up with me on the page.
************************************************** **********
Currently Active Users: ( members and guests)
Most users ever online was , at .
Reply With Quote
  #5  
Old 04-08-2009, 06:03 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you start with the template and page code from the original article I linked to? My article is just stuff to ADD to the other page/template. You need to have a working page first before you add the stuff in my article.
Reply With Quote
  #6  
Old 04-08-2009, 06:10 PM
soundbarrierpro soundbarrierpro is offline
 
Join Date: Nov 2007
Posts: 767
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Did you start with the template and page code from the original article I linked to? My article is just stuff to ADD to the other page/template. You need to have a working page first before you add the stuff in my article.
Yes, all my pages are Gary Kings vbpowered pages (which is your first suggested installed and working template/page article config). All are working. I added all the .php page changes. Then I added the change to the template which calls the .php page.
Reply With Quote
  #7  
Old 04-08-2009, 06:55 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why don't you post the code here. Use the php and html code tags when posting your php/template code.
Reply With Quote
  #8  
Old 04-08-2009, 07:08 PM
soundbarrierpro soundbarrierpro is offline
 
Join Date: Nov 2007
Posts: 767
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the template

PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
<
title>$vboptions[bbtitle]</title>
$headinclude
</head>
<
body>
$header

$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="tcat" colspan="2">Channel 1</td>
</
tr>
<
tr>
<
td class="tcat" colspan="2">
<
div align="center">
<
img src="http://www.mysite.com/picture.gif" width="71" height="62"
<
br>
<
a href="http://www.mysite.com">Site Info</a>
</
div>
<
br>
<
DIV ALIGN=CENTER>
<
h1 style="color:blue">
<
font size="5" face="Arial">

My info here

</font>
</
h1>
<
br>
<
DIV ALIGN=CENTER>

My info here

</DIV>
</
tr>
<!-- 
logged-in users -->
<
tbody>
    <
tr>
        <
td class="thead" colspan="2">
            <
a style="float:$stylevar[right]href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
            <
a href="online.php$session[sessionurl_q]rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
        </
td>
    </
tr>
</
tbody>
<
tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
    <
tr>
        <
td class="alt2"><a href="online.php$session[sessionurl_q]rel="nofollow"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]border="0" /></a></td>
        <
td class="alt1" width="100%">
            <
div class="smallfont">
                <
div style="white-space: nowrap"><phrase 1="$recordusers2="$recorddate3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
                <
div>$activeusers</div>
            </
div>
        </
td>
    </
tr>
</
tbody>
<!-- 
end logged-in users -->
</
table>
$footer
<script type="text/javascript">
var 
gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." "http://www.");
document.write(unescape("%3Cscript src='" gaJsHost "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</
script>
<
script type="text/javascript">
var 
pageTracker _gat._getTracker("xxxxxxxx");
pageTracker._trackPageview();
</
script>
</
body>
</
html
--------------- Added [DATE]1239221440[/DATE] at [TIME]1239221440[/TIME] ---------------

I can't post the page code. The AJAX just spins then times out when it tries to post
Reply With Quote
  #9  
Old 04-08-2009, 07:13 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, the template looks fine. The only thing I can think of for the php is that you are evaling your own template before the code to create the activeusers is evaled. So, make sure that isn't so.
Reply With Quote
  #10  
Old 04-08-2009, 07:20 PM
soundbarrierpro soundbarrierpro is offline
 
Join Date: Nov 2007
Posts: 767
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Well, the template looks fine. The only thing I can think of for the php is that you are evaling your own template before the code to create the activeusers is evaled. So, make sure that isn't so.
What does evaling mean?

I can tell you, I put this chunk of code at the end of my .php page after "Start main script"

// ### LOGGED IN USERS #################################################

code start and end here
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03995 seconds
  • Memory Usage 2,286KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete