View Full Version : Added a new phrase what now?
cono1717
11-02-2008, 01:39 PM
As the title suggests I have added a phrase to my forum but I am having a little trouble implementing it. What I need to know is how to I set up the Album section of vbulletin to have my custom phrase. If it help my phrase name is [elite_only].
Also is there a specific place that the phrase should go?
Please help,
Connor
Lynne
11-02-2008, 02:15 PM
To use it in a template, you would put $vbphrase[elite_only]. As for specifically where, we can't really tell you since you haven't said where you want it. If you need to find the template, vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.
cono1717
11-02-2008, 02:20 PM
Sorry about that basically when a member clicks on the album section they get the vBulletin error message which is [vbulletin_message] (i think) I basically want to change some coding or whatever so that instead of going to vbulletin_message it goes to elite_only
if that makes sense
again sorry for the lack of info in first post
Connor
Lynne
11-02-2008, 02:49 PM
Why don't you just edit the error message?
cono1717
11-02-2008, 02:52 PM
Because that error message is a standard error message across the system I want this to be only for elite member sections which is what the album section is.
Lynne
11-02-2008, 03:08 PM
I've never played with changing the error messages, but I suppose you can just put a condition in the template:
<if condition="THIS_SCRIPT == 'album'">
$vbphrase[whatever]
<else />
$vbphrase[other]
</if>
Lynne
11-02-2008, 03:17 PM
Actually, the other way would be to use the hook "album_start_precheck" and process your error there. They do a check for the permissions around line 190 in album.php and spit out the error there. What you can do is use the hook to perform that same check only spit out your error instead.
cono1717
11-02-2008, 03:29 PM
Actually, the other way would be to use the hook "album_start_precheck" and process your error there. They do a check for the permissions around line 190 in album.php and spit out the error there. What you can do is use the hook to perform that same check only spit out your error instead.
Sorry I don't understand.
Lynne
11-02-2008, 03:52 PM
I was just suggesting that you may be able to use the plugin system - Adding or Editing a Plugin (http://www.vbulletin.com/docs/html/add_plugin)
It's a preference thing.... some people would rather use plugins than edit templates.
cono1717
11-02-2008, 04:02 PM
Hmm yes this does seem easier to do rather than edit files, so what code do I enter as the code you provided before is HTML this needs to be in PHP
Lynne
11-02-2008, 04:19 PM
Well, as I said in my post above, the permissions code starts on line 190 in albums.php. I would just copy that code and put in the new error. You need to look up how standard_error gets called and what is required in your call to that function since that is the function you need to use to call your own custom error. The function standard_error is in includes/functions.php line 2801. The phrase you call instead of 'invalidid' must be phrase type Front-End Error Messages also.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.