Random Tips Revisited
Demo link in my sig. Updated Random Tips show on every page below navbar but vbacmps page, I added it as a module. Either refresh page or surf the site.
I can not release an updated version of this modification due to the fact it is not marked as re-useable code. The author can not be reached, I have tried.
I can however show you what edits I made to this modification and you will have to edit it yourself. Has been tested up to version 3.8.4, but should work up to 3.8.7.
Lets begin.
First you will need to download this modification, import product (ALLOW OVERWRITE)to see what it looks like now.
Then edit it with the following edits & import product again.
Open Product, TDT - Random Tips, using wordpad.
Search for:
=========================================
Code:
<if condition="$vboptions[tip_turn]">
Add before:
Code:
<if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7)"><!-- Remove or add usergroups here -->
<if condition="$bbuserinfo[userid]">
<if condition="$vbulletin->userinfo['fieldxx'] == Hide">
<else />
<!--[if lte IE 6]>
<![endif]-->
This will allow you to set usergroup permissions & will also allow members to turn it off via usercp. This will be discussed later.
You will be able to edit this at any time via Random Tips template.
=========================================
Search for:
Code:
<tr>
<td class="alt1">
<strong>Tips: </strong>
Replace with:
Code:
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('random_tips')"><img id="collapseimg_random_tips" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_random_tips].gif" alt="" border="0" /></a> Random Tips
</td>
</tr>
</tbody>
<tbody id="collapseobj_random_tips" style="$vbcollapse[collapseobj_random_tips]">
<tr>
<td class="alt2"><img src="$stylevar[imgdir_misc]/tips.png" alt="While browsing our site, many useful tips will appear here."/></td>
<td class="alt1" width="100%">
Tips Image added below as attachment, upload it to your images/misc folrder
=========================================
Search for:
Code:
</SCRIPT>
</td>
</tr>
</table>
<br />
</if>
Replace with:
Code:
</SCRIPT>
</td>
</tr>
</tbody>
</table>
<br />
</if>
</if>
</if>
=========================================
Search for:
Quote:
<phrase name="setting_more_tips_desc" date="1156526990" username="Chang" version="0.1"><![CDATA[<b>EN:</b> If you want have more tips, you can type code with grammar here<br><i>tips[number++] = "<font color="green">content_of_tip</font>"</i><br><br><b>VN:</b> Neu ban muon co them nhieu loi nhan nua, ban co the them code vao o ben phai voi cau truc<br><i>tips[number++] = "<font color="green">Noi_dung_loi_nhan</font>"</i>]]></phrase>
|
Replace with:
Quote:
<phrase name="setting_more_tips_desc" date="1156526990" username="Chang" version="0.1"><![CDATA[ If you would like to add more tips, simply copy line below then paste it in text area.<br>tips[number++] = 'Add your tip info here'<br> Add new tips on seperate lines]]></phrase>
|
=========================================
Search for:
Quote:
<phrase name="setting_tip1_title" date="1156526990" username="Chang" version="0.1"><![CDATA[Type tip into textboxs (support HTML) - Ban nhap cac loi nhan vao cac o (co the dung HTML)]]></phrase>
|
Replace with:
Quote:
<phrase name="setting_tip1_title" date="1156526990" username="Chang" version="0.1"><![CDATA[Type Tip Information into textboxs (Supports HTML) - <b>When adding html to tips, replace all " with ' or no tips will show</b> <b>(DOES NOT SUPPORT BBCODES)</b>]]></phrase>
|
=========================================
Search for:
Quote:
<phrase name="setting_tip_turn_title" date="1156526990" username="Chang" version="0.1"><![CDATA[Turn Tips On/Off (Add <b>$randomtips</b> in place you want to show tips)]]></phrase>
|
Replace with:
Quote:
<phrase name="setting_tip_turn_title" date="1156526990" username="Chang" version="0.1"><![CDATA[Turn Tips On/Off (REMEMBER to add <b>$randomtips</b> in the template you want to show tips) Example Templates: navbar, forumhome, ect..]]></phrase>
|
=========================================
Saerch for:
Code:
<setting varname="tip_turn" displayorder="10">
<datatype>free</datatype>
Replace with:
Code:
<setting varname="tip_turn" displayorder="10">
You are only removing <datatype>free</datatype>
=========================================
Find and replace all instances of:
Code:
<datatype>free</datatype>
Replace with:
Code:
<optioncode>textarea</optioncode>
Thats about it. It looks a whole lot better with my edits.
README
Quote:
Description
---------------------------------------------------------------
Displays random tips on most pages of your board when $randomtips is added to templates
Installation
---------------------------------------------------------------
1) Go to ACP / Plugins & Products / Manage Products and import product-tips.xml
2) Again, in admincp/vbulletin options/Random Tips
Once there its really self explanatory. Follow intructions on how to add HTML tips at top of page & adding extra tips at bottom of page.
3) To get the tips to show on your pages.
If you would rather not show tips below navbar on vba pages, skip the following navbar edit;
Add $randomtips to the template you wish to show tips on.
Example: navbar(paste $randomtips all the way at the bottom to show tips below navbar) this will show tips on every page on your board.
----------------------------------------------------------------
If you are using vba CMPS, you will need to add randomtips without the $ to vba CMPS/Default Settings/Main Options/ Portal Output Global Variables Section- Failure to do so will result in no tips showing on any vba CMPS pages.
Product needs to be installed as normal for this to work.
Tips show on vba pages are the same tips as shown on other pages.
----------------------------------------------------------------
If you would like to show a vba module for random tips, download & install the randomtips module.
To install module for vba CMPS,
vbacmps/download upload modules/ click browse, select the module you downloaded, select style you wish to add module to, set permissions & click submit.. Center column is best location.
----------------------------------------------------------------
I wrote in the template to allow members to show/hide tips. You will need to create a new profile field. (Remember the profile field number, you will need it later.)
Again, in admincp/User Profile Fields/Add New User Profile Field
Profile field Type: Single-Selection Radio Buttons
Title: Random Tips
Description:If you wish not to see the random tips below navbar select Hide. ( Add whatever you want)
Options: Type in Show , hit your enter key & type in Hide (Each option needs to be on seperate lines.)
Field Required: I set mine to no, but you do what you will.
Field Editable by User: Again, I set mine to yes, but you set it the way you want.
Private Field, Field Searchable on Members List & Show on Members List, all set to no.
In the Display Page Section, click the drop down & select Options: other
Click save.
----------------------------------------------------------------
Now you need to add the profile field number to the randomtips template at the top of the template. You will see <if condition="$vbulletin->userinfo['fieldxx'] == Show"> change the xx to your newly created profile field number & click save.
Inform your members to go into their usercp/edit option, on bottom of page to set it to hide if they wish not to see tips. Default is set to show.
Thats it...Enjoy
|
Enjoy!
If you use this modification with the edits I provided please click the
https://vborg.vbsupport.ru/images/cs...ttons/like.gif to the left. Thank You!
Demo link in my sig. Updated Random Tips show on every page below navbar but vbacmps page, I added it as a module. Either refresh page or surf the site.