PDA

View Full Version : Mini Mods - Random Tips - Simple Random System


tackebong
09 Feb 2008, 08:33
Show tips on your forum by random method (random at load page)

Easy to use
-20 slot available to enter text
-Support More text

Note: if you want use HTML in each slot, you must use ' to replace "
ex: <img src="http://imglink.net/img.jpg"> => <img src='http://imglink.net/img.jpg'>

INTALL
1.Import via product
2.Edit template navbar (or other where you want to show random tips)
add at bottom oftemplate
$randomtips

avsunforum
09 Feb 2008, 12:37
hmm Thank you very much

gwerzal
09 Feb 2008, 15:03
looks good, you got a demo.

thank you very much.

Feckie (Roger)
09 Feb 2008, 15:36
clicks installed

Forum Lover
10 Feb 2008, 13:08
Well, where it will show the tips?

gwerzal
10 Feb 2008, 13:17
Well, where it will show the tips?

Thats what i need to know.

This could be very useful for me

ragtek
10 Feb 2008, 13:18
under the navbar
2.Edit template navbar (or other where you want to show random tips)
add at bottom oftemplate

rainyleaves
13 Feb 2008, 16:37
Thanks!!!!

hjuijig
14 Feb 2008, 23:48
I just installed this, but can't see the tips. I see a box that says "Tips: " but the actual tip parts aren't showing up. I entered and saved them under the settings menu. They are turned on. I've checked with both Safari and Firefox browsers.

rolandogomez
09 Mar 2008, 18:03
Can you incorporate this with vBAdvanced as a home page module? Thanks, rg.

mgurain
21 May 2008, 07:03
hi,
could the template edit be auto (by hook) ?

Thanks,,

pcoskat
21 Jun 2008, 16:19
Can you incorporate this with vBAdvanced as a home page module? Thanks, rg.

I'm wondering the same thing...

Legende
21 Jun 2008, 16:45
Would be nice if the tips could be enabled/disabled by the user itself ;)

Scarface Claw
22 Jun 2008, 01:44
^exactaly.

Long time members are going to get sick of it.

Zacarias
22 Jun 2008, 11:13
I don't think I'm gonna use this for tips. A randomizer. Just what I was looking for. Thanks for this useful mod!

PoetJA-1975
29 Jun 2008, 02:35
Great mod = Thanx ;)

Jacquii.

PoetJA-1975
29 Jun 2008, 02:36
^exactaly.

Long time members are going to get sick of it.

Um - the secret of message board success. Updating with FRESH CONTENT :D

Jacquii.

robwestpdx
28 Oct 2008, 15:37
can we change the word "Tips" to something else? I couldn't find it bin the search phrase

blind-eddie
10 Apr 2012, 04:06
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:
=========================================
<if condition="$vboptions[tip_turn]">

Add before:

<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:

<tr>
<td class="alt1">
<strong>Tips: </strong>

Replace with:

<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:


</SCRIPT>
</td>
</tr>
</table>
<br />
</if>

Replace with:

</SCRIPT>
</td>
</tr>
</tbody>
</table>
<br />
</if>
</if>
</if>
=========================================
Search for:

<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:


<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:

<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:

<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>&nbsp; &nbsp;<b>(DOES NOT SUPPORT BBCODES)</b>]]></phrase>

=========================================
Search for:

<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:

<phrase name="setting_tip_turn_title" date="1156526990" username="Chang" version="0.1"><![CDATA[Turn Tips On/Off &nbsp;&nbsp; (REMEMBER to add <b>$randomtips</b> in the template you want to show tips)&nbsp;&nbsp;Example Templates: navbar, forumhome, ect..]]></phrase>
=========================================
Saerch for:

<setting varname="tip_turn" displayorder="10">
<datatype>free</datatype>

Replace with:

<setting varname="tip_turn" displayorder="10">
You are only removing <datatype>free</datatype>
=========================================

Find and replace all instances of:

<datatype>free</datatype>

Replace with:

<optioncode>textarea</optioncode>


Thats about it. It looks a whole lot better with my edits.

README

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 http://www.vbulletin.org/forum/images/cstyle/red/buttons/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.

viper357
15 May 2012, 16:50
Killer post Eddie, thanks, will implement your changes soon. But quick question, that thread preview on your board, the one where it pops up a box when you hover your mouse over the thread link, how'd you do that? :)

blind-eddie
16 May 2012, 11:25
Glad you like it, thanks. It was quite boring before the changes I made.

The hover over is jQt Suite (jQuery Tools Tooltips & Overlays) (http://www.vbulletin.org/forum/showthread.php?t=259770)