vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   WOL variable in VBPowered Pages (https://vborg.vbsupport.ru/showthread.php?t=210669)

soundbarrierpro 04-08-2009 03:48 PM

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

Lynne 04-08-2009 05:15 PM

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.

TNCclubman 04-08-2009 05:46 PM

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.

soundbarrierpro 04-08-2009 05:49 PM

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 .

Lynne 04-08-2009 06:03 PM

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.

soundbarrierpro 04-08-2009 06:10 PM

Quote:

Originally Posted by Lynne (Post 1786786)
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.

Lynne 04-08-2009 06:55 PM

Why don't you post the code here. Use the php and html code tags when posting your php/template code.

soundbarrierpro 04-08-2009 07:08 PM

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

Lynne 04-08-2009 07:13 PM

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.

soundbarrierpro 04-08-2009 07:20 PM

Quote:

Originally Posted by Lynne (Post 1786845)
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


All times are GMT. The time now is 10:27 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
  • Page Generation 0.01026 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete