You don't need the <phrase> tags around $vbphrase[onlineinvisible]. You'll only need those if you're going to be using a variable inside of the phrase. For example: phrase1: "There have been {1} users online today, but there were {2} online yesterday." Then you'd use: <phrase 1="$userstoday" 2="$usersyesterday">$vbphrase[onlinetoday]</phrase>.
Paul's code caches the template so your board doesn't have to query for it every page load. The template is installed (if that's what you were trying to say) whenever the product is imported.
This code needs to be put in a plugin by itself using hook 'cache_templates'.
Code:
if (THIS_SCRIPT == 'index')
{
$globaltemplates[] = 'silly_newbie_template';
}
You'll want to take a look at this code again too, as it looks like you didn't copy the whole code that was posted. Take another look at JumpD's post.
Code:
$search_text = '$vbphrase[x_members_and_y_guests]</phrase>)';
$vbulletin->templatecache['FORUMHOME'] = str_replace($search_text,
Quote:
- Removed the search string from the template because I know how it works now (thank you again, acidburn)
|
If you remove the search string from the template, the plugin won't know where to place the 's_n_t' code. As I said earlier, the search string is not replaced, instead whatever is in the 's_n_t' template is added beneath it.