View Full Version : is there a way to add a refresh
tipoboy
07-09-2007, 05:20 PM
is there a way to add a refresh to vbulletin for instance when you click on the new posts and it lists them, it refreshes the page every 30 seconds, this would allow you to see who has posted new posts in the forums
anyone know how to do this??
Brandon Sheley
07-09-2007, 05:28 PM
do you mean like
http://forums.digitalpoint.com/spy.php
?
if so, it would be a custom mod
tipoboy
07-09-2007, 05:32 PM
no i mean like the refresh option in online.php.
the page refreshes itself every 30 seconds. i want the search.php page when you click on new posts to refresh every 30 seconds is this possible?
thanks
searching here and atvb.com i found this spiece of script
<meta http-equiv="refresh" content="5; URL=search.php?$session[sessionurl]">
i put it in my search template but it didnt work does anyone know how i can do this i want my new posts page to refresh automatically every 30 seconds
any help is greatly appreciated
tipoboy
07-11-2007, 12:05 AM
anyone??
Dismounted
07-11-2007, 05:35 AM
<meta http-equiv="refresh" content="30; URL=search.php?$session[sessionurl]do=getnew">
tipoboy
07-11-2007, 09:59 AM
<meta http-equiv="refresh" content="30; URL=search.php?$session[sessionurl]do=getnew">
thanks dismounted tried putting that in both my search_results and search_forums templates and it didnt work any suggestions where i might put it, to make it work?
thanks for your help so far
Dismounted
07-11-2007, 11:24 AM
Where are you putting it? Where in the template?
tipoboy
07-11-2007, 03:33 PM
in the search_forums template here is the code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
$metarefresh
<title>$vboptions - <if condition="$show['searchthread']">$vbphrase[search_thread]<else />$vbphrase[search_forums]</if></title>
</head>
<body>
$header
$navbar
[B]<meta http-equiv="refresh" content="10; URL=search.php?$session[sessionurl]do=getnew">
<if condition="$show['errors']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
$vbphrase[errors_occured_with_search]:
</td>
</tr>
<tr>
<td class="alt1">
<ol>$errorlist</ol>
</td>
</tr>
</table>
<br />
</if>
<form action="search.php?do=process" method="post" name="vbform" id="searchform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="searchthreadid" value="$searchthreadid" />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
<if condition="$show['searchthread']">$vbphrase[search_thread] - <a href="showthread.php?$session[sessionurl]t=$threadinfo[threadid]">$threadinfo[title]</a><else />$vbphrase[search_forums]</if>
</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td align="$stylevar[left]" valign="top" width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend>$vbphrase[search_by_key_word]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td colspan="2">
<div>$vbphrase[key_words]:</div>
<div><input type="text" class="bginput" name="query" size="35" value="$query" style="width:250px" /></div>
</td>
</tr>
<if condition="!$show['searchthread']">
<tr>
<td>
<select name="titleonly">
<option value="0" $titleonlyselected[0]>$vbphrase[search_entire_posts]</option>
<option value="1" $titleonlyselected[1]>$vbphrase[search_titles_only]</option>
</select><if condition="$show['nocache']"> <label for="cb_nocache"><input type="checkbox" name="nocache" value="1" id="cb_nocache" />$vbphrase[do_not_use_cached_results]</label></if>
</td>
</tr>
</if>
</table>
</fieldset>
</td>
<td align="$stylevar[left]" valign="top" width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend>$vbphrase[search_by_user_name]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td colspan="2">
<div>$vbphrase[username]:</div>
<div id="userfield">
<input type="text" class="bginput" name="searchuser" id="userfield_txt" size="35" value="$searchuser" style="width:250px" autocomplete="off" />
</div>
<if condition="$show['searchthread']">
<div>
<label for="cb_exactname"><input type="checkbox" name="exactname" value="1" id="cb_exactname" $exactnamechecked[1] />$vbphrase[exact_name]</label>
</div>
</if>
<if condition="$show['popups']">
<div id="userfield_menu" class="vbmenu_popup" style="display:none"></div>
<script type="text/javascript" src="clientscript/vbulletin_ajax_namesugg.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
vbmenu_register('userfield', true);
snc = new vB_AJAX_NameSuggest('snc', 'userfield_txt', 'userfield');
//-->
</script>
</if>
</td>
</tr>
<if condition="!$show['searchthread']">
<tr>
<td>
<select name="starteronly">
<option value="0" $starteronlyselected[0]>$vbphrase[find_posts_by_user]</option>
<option value="1" $starteronlyselected[1]>$vbphrase[find_threads_started_by_user]</option>
</select>
</td>
<td><label for="cb_exactname"><input type="checkbox" name="exactname" value="1" id="cb_exactname" $exactnamechecked[1] />$vbphrase[exact_name]</label></td>
</tr>
</if>
</table>
</fieldset>
</td>
</tr>
<if condition="$imagereg">
<tr>
<td align="$stylevar[left]" valign="top" colspan="2">$imagereg</td>
</tr>
</if>
</table>
<div align="$stylevar[left]">
<div class="thead" style="padding:$stylevar[cellpadding]px">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('search_adv')"><img id="collapseimg_search_adv" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_search_adv].gif" alt="" border="0" /></a>
$vbphrase[search_options]
</div>
<div id="collapseobj_search_adv" style="$vbcollapse[collapseobj_search_adv]">
<table class="panel" cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr valign="top">
<td width="50%">
<if condition="!$show['searchthread']">
<fieldset class="fieldset">
<legend>$vbphrase[find_threads_with]</legend>
<div style="padding:$stylevar[formspacer]px">
<select name="replyless" style="width:150px">
<option value="0" $replylessselected[0]>$vbphrase[at_least]</option>
<option value="1" $replylessselected[1]>$vbphrase[at_most]</option>
</select>
<input type="text" class="bginput" style="font-size:11px" name="replylimit" size="3" value="$replylimit" /> $vbphrase[replies]
</div>
</fieldset>
</if>
<fieldset class="fieldset">
<legend>$vbphrase[find_posts_from]</legend>
<div style="padding:$stylevar[formspacer]px">
<select name="searchdate" style="width:150px">
<option value="0" $searchdateselected[0]>$vbphrase[any_date]</option>
<option value="lastvisit" $searchdateselected[lastvisit]>$vbphrase[your_last_visit]</option>
<option value="1" $searchdateselected[1]>$vbphrase[yesterday]</option>
<option value="7" $searchdateselected[7]>$vbphrase[a_week_ago]</option>
<option value="14" $searchdateselected[14]><phrase 1="2">$vbphrase[x_weeks_ago]</phrase></option>
<option value="30" $searchdateselected[30]>$vbphrase[a_month_ago]</option>
<option value="90" $searchdateselected[90]><phrase 1="3">$vbphrase[x_months_ago]</phrase></option>
<option value="180" $searchdateselected[180]><phrase 1="6">$vbphrase[x_months_ago]</phrase></option>
<option value="365" $searchdateselected[365]>$vbphrase[a_year_ago]</option>
</select>
<select name="beforeafter">
<option value="after" $beforeafterselected[after]>$vbphrase[and_newer]</option>
<option value="before" $beforeafterselected>$vbphrase[and_older]</option>
</select>
</div>
</fieldset>
<if condition="!$show['searchthread']">
<fieldset class="fieldset">
<legend>$vbphrase[sort_results_by]</legend>
<div style="padding:$stylevar[formspacer]px">
<select name="sortby" style="width:150px">
<option value="rank" $sortbyselected[rank]>$vbphrase[relevancy]</option>
<option value="title" $sortbyselected[title]>$vbphrase[title]</option>
<option value="replycount" $sortbyselected[replycount]>$vbphrase[number_of_replies]</option>
<option value="views" $sortbyselected[views]>$vbphrase[number_of_views]</option>
<option value="threadstart" $sortbyselected[threadstart]>$vbphrase[thread_start_date]</option>
<option value="lastpost" $sortbyselected[lastpost]>$vbphrase[last_posting_date]</option>
<option value="postusername" $sortbyselected[postusername]>$vbphrase[username]</option>
<option value="forum" $sortbyselected[forum]>$vbphrase[forum]</option>
</select>
<select name="order">
<option value="descending" $sortorderselected[descending]>$vbphrase[in_descending_order]</option>
<option value="ascending" $sortorderselected[ascending]>$vbphrase[in_ascending_order]</option>
</select>
</div>
</fieldset>
<fieldset class="fieldset">
<legend>$vbphrase[show_results_as]</legend>
<div style="padding:$stylevar[formspacer]px">
$vbphrase[show_results_as]
<label for="rb_showposts_0"><input type="radio" name="showposts" value="0" id="rb_showposts_0" $showpostschecked[0] />$vbphrase[threads]</label>
<label for="rb_showposts_1"><input type="radio" name="showposts" value="1" id="rb_showposts_1" $showpostschecked[1] />$vbphrase[posts]</label>
</div>
</fieldset>
</if>
</td>
<if condition="!$show['searchthread']">
<td width="50%">
<fieldset class="fieldset" style="margin:0px">
<legend>$vbphrase[search_in_forums]</legend>
<div style="padding:$stylevar[formspacer]px">
<div>
<select style="width:100%" name="forumchoice[]" size="13" multiple="multiple">
<option value="0" $noforumselected>$vbphrase[search_all_open_forums]</option>
<option value="subscribed">$vbphrase[search_subscribed_forums]</option>
$searchforumbits
</select>
</div>
<div><label for="cb_childforums"><input type="checkbox" name="childforums" value="1" id="cb_childforums" $childforumschecked[1] />$vbphrase[also_search_in_child_forums]</label></div>
<if condition="$show['cantsearchposts']">$vbphrase[you_can_only_search_thread_titles]</if>
</div>
</fieldset>
</td>
</if>
</tr>
</table>
</div>
</div>
<div style="margin-top:$stylevar[cellpadding]px">
<input type="submit" class="button" name="dosearch" value="$vbphrase[search_now]" accesskey="s" />
<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" onclick="window.location='search.php?$session[sessionurl]type=advanced';" />
</div>
</td>
</tr>
</table>
<if condition="$show['member']"><p align="center">
<select name="saveprefs">
<option value="1" selected="selected">$vbphrase[save_search_preferences]</option>
<option value="0">$vbphrase[clear_search_preferences]</option>
</select>
<input type="submit" class="button" name="doprefs" value="$vbphrase[go]" id="save_searchprefs" />
<input type="image" src="$vboptions[cleargifurl]" width="1" height="1" />
<script type="text/javascript" src="clientscript/vbulletin_ajax_search.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
vB_AJAX_SearchPrefs_Init('save_searchprefs');
//-->
</script>
</p></if>
</form>
$footer
</body>
</html>
and in my search results template code here:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
$metarefresh
<title>$vboptions[bbtitle] - $vbphrase[search_results]</title>
<if condition="$show['inlinemod']"><script type="text/javascript" src="clientscript/vbulletin_inlinemod.js?v=$vboptions[simpleversion]"></script></if>
</head>
<body>
$header
$navbar
[B]<meta http-equiv="refresh" content="30; URL=search.php?$session[sessionurl]do=getnew">
<if condition="$pagenav">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>
<form action="inlinemod.php?forumid=$forumid" method="post" id="inlinemodform">
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="forumid" value="$forumid" />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="threadslist">
<tr>
<td class="tcat" colspan="$threadcolspan" style="font-weight:normal">
<if condition="$show['inlinemod'] AND $search['showposts']"><input name="allbox" style="margin: 0px 0px 0px 5px; padding: 0px; float: right; vertical-align: middle;" id="checkall_all" title="$vbphrase[check_uncheck_all]" onclick="inlineMod.check_all();" type="checkbox" /></if>
<span class="smallfont" style="float:$stylevar[right]">
<if condition="$show['results']">
<phrase 1="$first" 2="$last" 3="$numitems">$vbphrase[showing_results_x_to_y_of_z]</phrase>
<br />
</if>
<if condition="$show['generated']">
<phrase 1="$searchtime" 2="$searchminutes">$vbphrase[search_took_x_seconds_gen_y_mins]</phrase>
<else />
<phrase 1="$searchtime">$vbphrase[search_took_x_seconds]</phrase>
</if>
</span>
<a href="search.php?$session[sessionurl]$searchquery"><strong>$vbphrase[search]:</strong></a>
<span class="smallfont">
<if condition="$action == 'process'">
<if condition="$displayWords">$vbphrase[key_words]: $displayWords</if>
<if condition="$displayWords AND $displayUsers">; </if>
<if condition="$displayUsers">
<if condition="$starteronly">$vbphrase[threads_started_by]<else />$vbphrase[posts_made_by]</if>: $displayUsers
</if>
<else />
<if condition="$action == 'getnew'">$vbphrase[new_posts_nav]<else />$vbphrase[posts_from_last_day]</if>
</if>
<if condition="$displayForums">
; $vbphrase[forum]: $displayForums <if condition="$childforums">$vbphrase[and_child_forums]</if>
</if>
<if condition="$show['titleonlysearch']">
<br /><strong><phrase 1="$titlesearchurl">$vbphrase[thread_titles_only_search]</phrase></strong>
</if>
</span>
</td>
</tr>
<if condition="$displayCommon">
<tr>
<td class="thead" style="font-weight: normal" colspan="$threadcolspan">$vbphrase[words_very_common]: $displayCommon</td>
</tr>
</if>
<if condition="$search['showposts']">
</table>
$searchbits
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<else />
$announcebits
<tr>
<if condition="$show['threadicons']">
<td class="thead" colspan="2"> </td>
<else />
<td class="thead"> </td>
</if>
<td class="thead" width="75%">$vbphrase[thread] / $vbphrase[thread_starter]</td>
<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[replies]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[views]</td>
<td class="thead" width="25%">$vbphrase[forum]</td>
<if condition="$show['inlinemod']">
<if condition="$show['popups']">
<td class="vbmenu_control" id="imod" align="center" title="$vbphrase[moderation]"> <script type="text/javascript"> vbmenu_register('imod'); </script> </td>
<else />
<td class="thead" align="center">
<input type="checkbox" name="allbox" id="checkall_all" title="$vbphrase[check_uncheck_all]" onclick="inlineMod.check_all()" />
</td>
</if>
</if>
</tr>
<if condition="!$show['results']">
<!-- show no threads message -->
<tr>
<td class="alt1" colspan="$threadcolspan" align="center">
<div style="padding: 16px">
<strong>$vbphrase[no_unread_threads]</strong>
</div>
</td>
</tr>
<!-- end show no threads message -->
<else />
$searchbits
</if>
<if condition="$show['ajax_js'] AND $show['results']">
<script type="text/javascript" src="clientscript/vbulletin_ajax_threadslist.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
vB_AJAX_Threadlist_Init('threadslist');
var titlemaxchars = parseInt("$vboptions[titlemaxchars]");
//-->
</script>
</if>
</if>
<tr>
<td class="tfoot" colspan="$threadcolspan" align="$stylevar[right]">
<if condition="$show['results']">
<span class="smallfont"><phrase 1="$first" 2="$last" 3="$numitems">$vbphrase[showing_results_x_to_y_of_z]</phrase></span>
<else />
</if>
</td>
</tr>
</table>
<if condition="$pagenav">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
</if>
<if condition="$show['inlinemod']">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
<td align="$stylevar[right]">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap; float:$stylevar[right]">
<strong>$vbphrase[moderation]</strong><br />
<if condition="!$search['showposts']">
<select name="do">
<optgroup label="$vbphrase[option]">
<if condition="$show['deletethread']">
<option value="deletethread">$vbphrase[delete_threads]</option>
<option value="undeletethread">$vbphrase[undelete_threads]</option>
</if>
<if condition="$show['openthread']">
<option value="open">$vbphrase[open_threads]</option>
<option value="close">$vbphrase[close_threads]</option>
</if>
<if condition="$show['approvethread']">
<option value="approvethread">$vbphrase[approve_threads]</option>
<option value="unapprovethread">$vbphrase[unapprove_threads]</option>
</if>
<if condition="$show['movethread']">
<option value="stick">$vbphrase[stick_threads]</option>
<option value="unstick">$vbphrase[unstick_threads]</option>
<option value="movethread">$vbphrase[move_threads]</option>
<option value="mergethread">$vbphrase[merge_threads]</option>
</if>
</optgroup>
<optgroup label="____________________">
<option value="viewthread">$vbphrase[view_selected_threads]</option>
<option value="clearthread">$vbphrase[clear_thread_list]</option>
</optgroup>
</select><input type="submit" class="button" id="inlinego" value="$vbphrase[go]" />
<script type="text/javascript">
<!--
inlineMod = new vB_Inline_Mod('inlineMod', 'thread', 'inlinemodform', '$vbphrase[go_x]');
//-->
</script>
<else />
<select name="do">
<optgroup label="$vbphrase[option]">
<if condition="$show['managethread']">
<option value="mergeposts">$vbphrase[merge_posts]</option>
<option value="moveposts">$vbphrase[move_posts]</option>
<option value="copyposts">$vbphrase[copy_posts]</option>
</if>
<if condition="$show['managepost']">
<option value="deleteposts">$vbphrase[delete_posts]</option>
<option value="undeleteposts">$vbphrase[undelete_posts]</option>
</if>
<if condition="$show['approvepost']">
<option value="approveposts">$vbphrase[approve_posts]</option>
<option value="unapproveposts">$vbphrase[unapprove_posts]</option>
</if>
<if condition="$show['approveattachment']">
<option value="approveattachments">$vbphrase[approve_attachments]</option>
<option value="unapproveattachments">$vbphrase[unapprove_attachments]</option>
</if>
</optgroup>
<optgroup label="____________________">
<option value="viewpost">$vbphrase[view_selected_posts]</option>
<option value="clearpost">$vbphrase[clear_post_list]</option>
</optgroup>
</select><input type="submit" class="button" id="inlinego" value="$vbphrase[go]" />
<script type="text/javascript">
<!--
inlineMod = new vB_Inline_Mod('inlineMod', 'post', 'inlinemodform', '$vbphrase[go_x]');
//-->
</script>
</if>
</div>
</td>
</tr>
</table>
</if>
</form>
<br />
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="100%"> </td>
<td>$forumjump</td>
</tr>
</table>
<if condition="$show['inlinemod'] AND $show['popups']">
<div class="vbmenu_popup" id="imod_menu" style="display:none" align="$stylevar[left]">
$threadadmin_imod_menu
</div>
</if>
$footer
</body>
</html>
cheat-master30
07-11-2007, 03:42 PM
It goes between the <head> tags not the <body> ones.
tipoboy
07-11-2007, 06:41 PM
:eek: how could i be so stupid sorry about that
thanks to everybody for the help it works a treat now!!!!!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.