vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Tips of the Day (https://vborg.vbsupport.ru/showthread.php?t=245012)

Pod 06-20-2010 10:00 PM

Tips of the Day
 
1 Attachment(s)
Many computer programs display a "Tip of the day" window when you open it. This mod offers the same functionality for vBulletin.

- The tips are displayed as vB's stock notices.

- You have complete control to define how often a tip is shown. There are the following options: always on, once in a browser session, once a day, once every X minutes or once every X page views.

- Tips are phrased. If you have a multilanguage board, you can easily translate them.

- Every tip can be assigned to a user-group, so only its members will see it. It also checks secondary groups.

- The mod will chose one of the available tips randomly. You can change the probabilistic weight of every tip to control how often they will be shown.

- The appearance of the Tips can be easily configured using stylevars (including background, shadow color, font for the title of the tip, and color for both the title and main tip text). For advanced needs, you can also customize the pod_tips.css template.

- Import / export utility, so you can make security copies, or share with your friends.

- Option to deactivate tips for guests.

- Setting to disable for non-confirmed users (awaiting email confirmation or in moderation) and banned users.

- With the package, I provide a file with a few tips about basic vBulletin usage that you can import after installing the mod, so you have some default tips (if you find some mistake in the file, please tell me, English is not my first language).

- There's a setting to add an icon next to the tips. (The icon used in the screenshots comes from http://www.iconfinder.com/icondetail...es_system_icon ). You can very easily customize the CSS style for that icon using stylevars.

- You can let your users dismiss the Tips of the Day. After dismissing them, they can be enable by clicking the appropriate option in the Quick Links menu. Optionally, users must have been registered for a configurable number of days before they can dismiss (so you ensure they see some Tips before dismissing them). At any moment, users can undismiss Tips by selecting an option in the Quick Links menu.


PERFORMANCE

All the information of the Tips is retrieved using the second call of the datastore (just after init_startup). If you have any other mod that uses the same call to the datastore, it will use the same query.
Also, the mod avoids to load the datastore if it's possible to determine beforehand that there will be no tips displayed (it's not always possible, but most often).
Therefore, this mod increases your query count in AT MOST one single query on every page load.

Furthermore, the CSS uses the main-rollup file (if you are storing css in the file system), or the main call to css.php (if you are not). So it never requires an extra HTTP request.


INSTALL/UPGRADE INSTRUCTIONS

1. Unzip the mod file.

2. Upload all the files in the "upload" folder. Note: If you have renamed your admincp folder in your vb installation, make sure to do so before uploading. This is the file structure you have to upload:

./includes
./includes/xml
./includes/xml/bitfield_pod_tips.xml
./includes/xml/cpnav_podtips.xml
./includes/xml/cssrollup_pod_tips.xml
./admincp
./admincp/pod_tips.php


3. Import the product file.

4. Add few tips in the admincp: Notices > Tips of the day manager. Optionally, you can import the default vB usage tips provided with the package.

5. Go to Settings > Options > Tips of the day Settings, configure options as you wish, and set active to "yes" (the mod installs itself deactivated to give you a chance to add tips before activating).


MEANING OF PROBABILITY

If you set the probability of a tip to be "10", it doesn't mean that it will appear with a probability of 10%. The actual probability will depend on how many tips are availiable to display. The probability setting is relative to other tips. For instance, a tip with probability 10 will appear two times more often that one that you set to 5.


MODIFIED STYLES

This mod partially depends on the built-in notices system. Therefore, if you have modified your navbar template to a way that it cannot show regular vB's notices, this mod will probably not work. Since version 0.2, Tips should most likely work on most styles if ordinary notices are working, but cannot guarantee.


COMPATIBILITY

I tested this mod in vbulletin 4.0.4. However, it might probably work on any 4.0.x release (please, tell me if you run into any problem using this mod on earlier 4.0.x releases).


SIGNIFICANCE OF A BETA RELEASE

Please note that this mod is, at best, in beta stage. Therefore, I hold no responsibility on any harm or data loss it might cause. I strongly recommend testing it as extensively as possible in your testing environment before installing it in your production site.


SUPPORT

Despite its beta status, I'll do my best to support all vb admins that mark this mod as installed. Sometimes, support will be impossible without providing me admincp access (in a test install, preferably).


TRANSLATIONS

I provide a Spanish translation for this mod. You are most welcome to translate it and distribute your translation (only the language file) in any site, provided that you link to the official thread of the mod in vbulletin.org.

Note that you can only distribute the language file, downloaded from the Languages & Phrases section in your admin cp. Redistribution of the product itself is not allowed.


CHANGE LOG

v0.1 (June 21, 2010) Initial beta releases

v0.2 (June 26, 2010)
- Fixed missing phrase in tips manager, when there are no tips to show.
- Setting to disable for non-confirmed users (awaiting email confirmation or in moderation) and banned users
- Import / export utility.
- Setting to add an icon next to the tips. (The icon used in the screenshots comes from http://www.iconfinder.com/icondetail...es_system_icon ).
- Changed the way used to inject the tips into the page (thanks ragtek for the idea). Hopefully, will work better with modified styles.

v0.2.1 (June 27, 2010)
- Fixed bug that made the mod incompatible with mysql prior to 5.0.2.
- Fixed bug that made the mod incompatible with vBulletin prior to 4.0.4.

v0.3 (July 12, 2010)
- Style of the tips can now be customized using stylevars (there's also a pod_tips.css template for advanced needs).
- A new setting now allows you to choose in which areas of vBulletin should tips be displayed.
- Now you have more control to define how often a tip is shown. You have the following options: always on, once in a browser session, once a day, once every X minutes or once every X pageviews.
- Path and style of the icon for the tips has been moved from vBulletin options to stylevars (you'll need to configure it again, sorry).
- Option to make the Tips dismissible.

giorgino 06-21-2010 07:55 PM

Great great great plugin! :D
It's compatible with 4.0.4?

Pod 06-21-2010 08:39 PM

Quote:

Originally Posted by giorgino (Post 2057094)
Great great great plugin! :D
It's compatible with 4.0.4?

Yes. Actually, pretty much all my testing has been done in 4.0.4, but vb.org isn't updated and didn't let me chose that version :p

Bounce 06-21-2010 08:40 PM

Any chance of some "default" tips :)

chipc0i 06-22-2010 03:30 AM

nice mod!
can add tips for each forum ID?? if have many tips, can show random tips?

Boofo 06-22-2010 04:46 AM

Wouldn't using Notices do the same thing?

Pod 06-22-2010 08:09 AM

Quote:

Originally Posted by hIBEES (Post 2057113)
Any chance of some "default" tips :)

My idea on why this mod would be useful was to use site-specific tips (like reminders of some rules, etc). That's why I've chosen to not populate the tips table on install.

However, in future versions I want to add a import/export feature that would allow to release a file with some default tips.

Quote:

Originally Posted by chipc0i (Post 2057261)
if have many tips, can show random tips?

Yes. It picks one random tip (based on a configurable probabilistic weight defined by yourself).

Quote:

Originally Posted by chipc0i (Post 2057261)
nice mod!
can add tips for each forum ID??

Not in this version, sorry. And I don't think I'll be including it in future versions. Because my guess is that most people will set tips to be non-persistent (only 1 tip for browsing session, in the first page view), so forum specific tips would only be shown if the user enters to that forum. Even then, since the mod picks only one tip randomly, the forum specific tip would not always be seen.

You can use regular notices, they are more appropriate for forum specific messages.


Quote:

Originally Posted by Boofo (Post 2057277)
Wouldn't using Notices do the same thing?

Regular notices don't allow you to pick one of the available ones randomly. If there are several of them that mach the criteria, they are all shown.

So to speak, this mod adds a notice displaying a random "tip of the day".

Boofo 06-22-2010 08:33 AM

Quote:

Originally Posted by Pod (Post 2057332)
Regular notices don't allow you to pick one of the available ones randomly. If there are several of them that mach the criteria, they are all shown.

So to speak, this mod adds a notice displaying a random "tip of the day".

Ok, great. Thank you for the explanation. ;)

mobe00 06-22-2010 11:28 AM

not working..no notices are showing up. i use a custom style i made myself. ordinary notices working thou.

Pod 06-22-2010 12:02 PM

Quote:

Originally Posted by mobe00 (Post 2057399)
not working..no notices are showing up. i use a custom style i made myself. ordinary notices working thou.

First of all, have you tried to use persistent tips? If not, sometimes browsing the admin panel sets the session cookie to not display more tips, so when you go back to the front end you don't see a tip.

You can set persistent tips in the vb options (in the same place you activate the mod after adding some tips).

If that doesn't help, would you allow me to take a look into your navbar template, so I can see if it's feasible to support your style?

InTeNsE-HuMoR 06-22-2010 09:43 PM

I'm getting the following error:

Quote:

Parse error: syntax error, unexpected T_STRING in /home/****/public_html/****/includes/class_core.php(4044) : eval()'d code on line 2
Running on VBulletin 4.0.4

Pod 06-22-2010 10:06 PM

Quote:

Originally Posted by InTeNsE-HuMoR (Post 2057707)
I'm getting the following error:



Running on VBulletin 4.0.4

Are you running a style with a customized navbar template? Would you allow me to take a look into that template?

InTeNsE-HuMoR 06-22-2010 10:23 PM

Yes. Do you want me to PM you with the navbar template code?

Pod 06-22-2010 10:35 PM

Quote:

Originally Posted by InTeNsE-HuMoR (Post 2057717)
Yes. Do you want me to PM you with the navbar template code?

Sure.

InTeNsE-HuMoR 06-22-2010 11:14 PM

PM sent.

Update: This mod now works for me. Thanks Pod.

funmasti 06-23-2010 08:23 AM

its quite impressive

mobe00 06-23-2010 01:02 PM

Quote:

Originally Posted by Pod (Post 2057418)
First of all, have you tried to use persistent tips? If not, sometimes browsing the admin panel sets the session cookie to not display more tips, so when you go back to the front end you don't see a tip.

You can set persistent tips in the vb options (in the same place you activate the mod after adding some tips).

If that doesn't help, would you allow me to take a look into your navbar template, so I can see if it's feasible to support your style?

Hi ..thanks..but didnt help..i send you a pm with my navbar template :) so you can take a look

Pod 06-25-2010 10:05 PM

I've just released version v0.2, with the following new features:

- Changed the way used to inject the tips into the page (thanks ragtek for the idea). Hopefully, will work better with modified styles; now it should pretty much work for any style if regular vB notices are working.

- Import / export utility. With that, you can import a file with 25 general vB usage Tips I've created (20 tips for general users, 5 tips for moderators. If you find any mistake in the file, please tell me (English is my third language... thanks disjunto and Bradmax for the help with it).

- Setting to add an icon next to the tips. (The icon used in the screenshots comes from http://www.iconfinder.com/icondetail...es_system_icon ).

- Fixed missing phrase in tips manager, when there are no tips to show.

- Setting to disable for non-confirmed users (awaiting email confirmation or in moderation) and banned users

Veer 06-25-2010 11:29 PM

Good work.

Is there any way to change the background and shadow colors? It would be nice to make a deference between Notices and Tips.

Pod 06-26-2010 05:30 AM

Quote:

Originally Posted by Veer (Post 2059631)
Good work.

Is there any way to change the background and shadow colors? It would be nice to make a deference between Notices and Tips.

Will consider that as a built-in option for the next version. Thanks for the idea.

If you want to do it manually in the while, in version 0.2 you can simply add something like this in the aditional.css template

HTML Code:

#navbar_notice_pod_tip_notice
{
        background: red;
    -moz-box-shadow: -2px 2px 2px red;
    -webkit-box-shadow: -2px 2px 2px red;
}

This code would give you red Tips (which probably are very ugly :p customize it to your liking).

docvader 06-26-2010 06:38 PM

must be a mistake with the import tips file you provided (it has great information, but it won't import)

Database error in vBulletin 4.0.3:

Invalid SQL:
SELECT `id`, `prob`, `group` FROM pod_tips WHERE `active` IS TRUE ORDER BY `order`, `prob`, `title`;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRUE ORDER BY `order`, `prob`, `title`' at line 1
Error Number : 1064
Request Date : Saturday, June 26th 2010 @ 03:35:59 PM
Error Date : Saturday, June 26th 2010 @ 03:35:59 PM
Script : http://xxxxxx.com/admincp/pod_tips.php?do=doimport
Referrer : http://xxxxxxxxx.com/admincp/pod_tips.php?do=import
IP Address : xxxxxxx
Username : xxxx
Classname : vB_Database
MySQL Version : 4.1.22-standard

Tips get added in admincp area, but I'm getting a lot of these db errors when trying to add tips, or view them in the admincp.
Using VB 4.03

Pod 06-26-2010 07:05 PM

Quote:

Originally Posted by docvader (Post 2059996)
must be a mistake with the import tips file you provided (it has great information, but it won't import)

Database error in vBulletin 4.0.3:

Invalid SQL:
SELECT `id`, `prob`, `group` FROM pod_tips WHERE `active` IS TRUE ORDER BY `order`, `prob`, `title`;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRUE ORDER BY `order`, `prob`, `title`' at line 1
Error Number : 1064
Request Date : Saturday, June 26th 2010 @ 03:35:59 PM
Error Date : Saturday, June 26th 2010 @ 03:35:59 PM
Script : http://xxxxxx.com/admincp/pod_tips.php?do=doimport
Referrer : http://xxxxxxxxx.com/admincp/pod_tips.php?do=import
IP Address : xxxxxxx
Username : xxxx
Classname : vB_Database
MySQL Version : 4.1.22-standard

Tips get added in admincp area, but I'm getting a lot of these db errors when trying to add tips, or view them in the admincp.
Using VB 4.03

I don't think it has to do with the file. The query that gives you problems just reads all the contents of the table to create the datastore (that's why oyou get the error every time you try to add a tip. I guess it has to do with the version of your MySQL server (the error says it's 4.1.22, I never tested with anything under 5.x). Please allow me some time to find a way to find a test instalation of your version.

One question, when you tried the import, the "Check duplicated tips" box was checked?

docvader 06-26-2010 07:18 PM

doesnt matter if duplicated tips box is checked. Tips get imported, can be seen in admincp in tips manager, but still get database error after importing.

Tips don't show in forum, or anywhere, for that matter.


(not sure if Photogallery is messing with that)

Deleting tips gives the same db error. Doing anything with your system gives the same db error:

Database error in vBulletin 4.0.3:

Invalid SQL:
SELECT `id`, `prob`, `group` FROM pod_tips WHERE `active` IS TRUE ORDER BY `order`, `prob`, `title`;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRUE ORDER BY `order`, `prob`, `title`' at line 1
Error Number : 1064
Request Date : Saturday, June 26th 2010 @ 04:19:18 PM
Error Date : Saturday, June 26th 2010 @ 04:19:18 PM
Script : http://xxxxxxxxxx.com/admincp/pod_tips.php?do=dodelete
Referrer : http://xx.xxxxx.com/admincp/pod_tips...o=delete&id=52
IP Address : xxxxxxx
Username : xxxx
Classname : vB_Database
MySQL Version : 4.1.22-standard

Pod 06-26-2010 07:37 PM

1 Attachment(s)
Quote:

Originally Posted by docvader (Post 2060010)
doesnt matter if duplicated tips box is checked. Tips get imported, can be seen in admincp in tips manager, but still get database error after importing.

Tips don't show in forum, or anywhere, for that matter.


(not sure if Photogallery is messing with that)

Deleting tips gives the same db error. Doing anything with your system gives the same db error:

Database error in vBulletin 4.0.3:

Invalid SQL:
SELECT `id`, `prob`, `group` FROM pod_tips WHERE `active` IS TRUE ORDER BY `order`, `prob`, `title`;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRUE ORDER BY `order`, `prob`, `title`' at line 1
Error Number : 1064
Request Date : Saturday, June 26th 2010 @ 04:19:18 PM
Error Date : Saturday, June 26th 2010 @ 04:19:18 PM
Script : http://xxxxxxxxxx.com/admincp/pod_tips.php?do=dodelete
Referrer : http://xx.xxxxx.com/admincp/pod_tips...o=delete&id=52
IP Address : xxxxxxx
Username : xxxx
Classname : vB_Database
MySQL Version : 4.1.22-standard

Please, try to replace your admincp/pod_tips.php with the one attached in this post. If it works, I'll replace the package in the first post :D

docvader 06-26-2010 07:50 PM

GOOD JOB.

No more database errors.

Just can't see it on my forum now, LOL...

EDIT: turning off my other forumhome plugins, such as photopost integration, does not do anything. Does not seem to be interference with the other plugins. I guess I need to upgrade to vb 4.04...

Pod 06-26-2010 08:57 PM

Quote:

Originally Posted by docvader (Post 2060024)
GOOD JOB.

No more database errors.

Just can't see it on my forum now, LOL...

EDIT: turning off my other forumhome plugins, such as photopost integration, does not do anything. Does not seem to be interference with the other plugins. I guess I need to upgrade to vb 4.04...

Your navbar template seems ok. I think it should work even in 4.0.3.

Please try this, admincp > Settings > Options > Tips of the day Settings. Make sure the first two options are yes (both active and persistent tips).

You can turn off persistent tips later if you wish, but for testing it's better to have it on.

docvader 06-26-2010 09:06 PM

Had them both on. Didn't work.

Upgrading to 4.04. I guess it's time, LOL

Pod 06-26-2010 09:52 PM

Quote:

Originally Posted by docvader (Post 2060071)
Had them both on. Didn't work.

Upgrading to 4.04. I guess it's time, LOL

If you don't have any other reason for upgrading, hold on, I think I can fix the compatibility with 4.0.3.

docvader 06-26-2010 10:00 PM

Upgraded.
Tips works!

Awesome script. Keep up the good work. Need to make more tips....

Pod 06-26-2010 10:12 PM

Quote:

Originally Posted by docvader (Post 2060096)
Upgraded.
Tips works!

Awesome script. Keep up the good work. Need to make more tips....

Good to know it works :D

Anyway, I did the appropriate changes, if anyone wants to run it on vb4.0.3, it should work now.

docvader 06-26-2010 11:23 PM

Hey, this is impressive! And very useful, if you have a heavily scripted form with all sorts of extra features that you want to advertise, or explain.

One issue though: when starting a new browsing session, going to the "index" page of your forums generally leads you to the CMS area (HOME); that's where the tips are showing up. Is there anyway to make the tips only show up on the forum.php page (the actual forums)? I think having that as an option would be much more useful.

Pod 06-27-2010 05:15 AM

Quote:

Originally Posted by docvader (Post 2060146)
Hey, this is impressive! And very useful, if you have a heavily scripted form with all sorts of extra features that you want to advertise, or explain.

One issue though: when starting a new browsing session, going to the "index" page of your forums generally leads you to the CMS area (HOME); that's where the tips are showing up. Is there anyway to make the tips only show up on the forum.php page (the actual forums)? I think having that as an option would be much more useful.

Will see if I can put something like that together for 0.3.

EDIT: If you want, I can tell you a way to disable it for the cms, so you can have that functionality before I have time to prepare the next release.

ayalsule 06-27-2010 09:34 AM

1 Attachment(s)
Thank you for great add-ons
I provided Arabic translations
Ayham Alsuleman

Dr.osamA 06-29-2010 06:28 AM

thanxx Pod

good work dude

Quote:

Originally Posted by ayalsule (Post 2060377)
Thank you for great add-ons
I provided Arabic translations
Ayham Alsuleman

Sorry, but this does not work

installed + 5 Stars

ayalsule 06-30-2010 07:51 AM

it works great with me
maybe you do not know how to upload product ;)

Pod 06-30-2010 12:20 PM

Actually, what you have to download is the language file, not the product itself.

InTeNsE-HuMoR 07-01-2010 01:50 AM

How do I change the background colour of it?

Pod 07-01-2010 06:54 AM

Quote:

Originally Posted by InTeNsE-HuMoR (Post 2062513)
How do I change the background colour of it?

It's appearance is just the same as regular notices, which is controled by two style-vars: notices_background and notices_shadow.

If you want to give Tips a different appearance, that's a feature planned for the next version. Look at message #20 of this thread for a workaround in the while.

Dr.osamA 07-06-2010 02:48 AM

Quote:

Originally Posted by ayalsule (Post 2062133)
it works great with me
maybe you do not know how to upload product ;)

ha ha
maybe i don't know how to upload product looooool maybe :D
انت تتكلم من عقلك حبيبي ايهم انو ما راح اعرف ارفع منتج و لا عم تمزح ؟؟
و الله ضحكتني ترى هاه
و جاي من ثاني مشاركة بالموقع تحكم مين يعرف يرفع المنتج و مين لاء ؟؟
انت مترجمه بترميزك المناسب لمنتداك
product-pod_tip-ar-UTF-8.xml
هذا الترميز UTF-8 لا يعمل في جميع المنتديات على
و ما تترجم ملف التلميحات اليوم؟
على العموم الف شكر

Quote:

Originally Posted by Pod (Post 2062205)
Actually, what you have to download is the language file, not the product itself.

actually there are no language file but there is product product-pod_tip-ar-UTF-8.xml with not readable language as this code

Code:

<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="pod_tip" active="1">
        <title>?…?„ا?+ظة ا?„?Š?ˆ?…</title>
        <description>?Šعرض ?…?„ا?+ظة أ?ˆ ?+?ƒ?…ة ?Š?ˆ?…?Šة  تعر?Šب  <a href="http://ayham.alsuleman.info?tips">Ayham Alsuleman</a></description>
        <version>0.2.1</version>
        <url>https://vborg.vbsupport.ru/showthread.php?t=245012</url>
        <versioncheckurl><![CDATA[https://vborg.vbsupport.ru/misc.php?do=checkversion&t=245012]]></versioncheckurl>
        <dependencies>
        </dependencies>
        <codes>
                <code version="*">
                        <installcode><![CDATA[$db->query_write("CREATE TABLE IF NOT EXISTS `". TABLE_PREFIX ."pod_tips` (
    `id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
    `title` VARCHAR(100) NOT NULL,
    `group` INT(10) NOT NULL,
    `prob` INT(10) NOT NULL,
    `order` INT(10) NOT NULL,
    `active` BOOL NOT NULL DEFAULT 1)
    ");
]]></installcode>
                        <uninstallcode><![CDATA[$db->query_write("DROP TABLE IF EXISTS `". TABLE_PREFIX ."pod_tips`");
]]></uninstallcode>
                </code>
        </codes>
        <templates>
        </templates>
        <stylevardfns>
        </stylevardfns>
        <stylevars>
        </stylevars>
        <plugins>
                <plugin active="1" executionorder="5">
                        <title>أض?� ?…خز?† أ?ˆ عبارات ?„?‚ائ?…ة ا?„استرجاع</title>
                        <hookname>init_startup</hookname>
                        <phpcode><![CDATA[if ( $vbulletin->options['pod_tips_setting_active']
      AND ( $vbulletin->options['pod_tips_setting_persistent'] OR strpos($_COOKIE[COOKIE_PREFIX . 'pod_tip_displayed'], 'pod_tip_displayed') === false)
      AND !defined('NONOTICES') AND !defined('NOPMPOPUP') ) 
{
  global $phrasegroups;

  $phrasegroups[] = 'pod_tips_html';
  $datastore_fetch[] = "'podtipsstored'";
}]]></phpcode>
                </plugin>
                <plugin active="1" executionorder="5">
                        <title>ا?„?†ص ا?„بد?Š?„</title>
                        <hookname>notices_noticebit</hookname>
                        <phpcode><![CDATA[if ($_noticeid == 'pod_tip_notice')
{
  $notice_html =$vbulletin->noticecache['pod_tip_notice']['phrase'];
}]]></phpcode>
                </plugin>
                <plugin active="1" executionorder="5">
                        <title>أض?� ?…?„ا?+ظة ?„?‚ائ?…ة ا?„?…?„ا?+ظات</title>
                        <hookname>parse_templates</hookname>
                        <phpcode><![CDATA[if ( $vbulletin->options['pod_tips_setting_active']
        AND ($vbulletin->options['pod_tips_setting_guest']      OR  ($vbulletin->userinfo['usergroupid'] != 1))
        AND ($vbulletin->options['pod_tips_setting_unconfirmed']OR (($vbulletin->userinfo['usergroupid'] != 3) AND ($vbulletin->userinfo['usergroupid'] != 4)))
        AND ($vbulletin->options['pod_tips_setting_persistent'] OR strpos($_COOKIE[COOKIE_PREFIX . 'pod_tip_displayed'], 'pod_tip_displayed') === false)
        AND is_array($vbulletin->podtipsstored)
        AND !defined('NONOTICES') AND !defined('NOPMPOPUP')
  )
{

  $pod_usergroups  = explode(",", $vbulletin->userinfo['membergroupids']);
  $pod_usergroups[]= $vbulletin->userinfo['usergroupid'];
  //$pod_usergroups  = array_map('intval', $pod_usergroups);

  $pod_acum = 0;

  foreach($vbulletin->podtipsstored AS $pod_tip_id => $pod_tip)
  {
    if ( ($pod_tip['group'] == -1) OR in_array( intval($pod_tip['group']),  $pod_usergroups) )
    {
      $pod_acum += $pod_tip['prob']*10;
      $pod_tips[$pod_tip_id] = $pod_acum;
    }
  }

  if ( count($pod_tips) AND $pod_acum )
  {
    $pod_rand = mt_rand(1, $pod_acum);

    foreach( $pod_tips AS $pod_tip_id => $pod_acum )
    {
      if ($pod_rand <= $pod_acum) break;
    }
   
    if (!is_array($vbulletin->noticecache)) $vbulletin->noticecache = array();
   
    $vbulletin->noticecache['pod_tip_notice']['persistent'] = 1;
    $vbulletin->noticecache['pod_tip_notice']['phrase'] = $vbphrase['pod_tips_tiptitle'] . $vbphrase['pod_tips_html_n'.$pod_tip_id]; 
   
    if ($vbulletin->options['pod_tip_image_path'])
      $vbulletin->noticecache['pod_tip_notice']['phrase'] = "<img src='".$vbulletin->options['pod_tip_image_path']."' alt='' style='".$vbulletin->options['pod_tips_image_style']."' title='$vbphrase[pod_tips_img_title]' />" . $vbulletin->noticecache['pod_tip_notice']['phrase'] . '<div style="clear: both;"> </div>';
   
    if (!$vbulletin->options['pod_tips_setting_persistent']) vbsetcookie('pod_tip_displayed', 'pod_tip_displayed', false); 
  }
}]]></phpcode>
                </plugin>
        </plugins>
        <phrases>
                <phrasetype name="Control Panel Global" fieldname="cpglobal">
                        <phrase name="pod_tip_cpg_add_tip" date="1277505578" username="pod" version="0.2"><![CDATA[أض?� ?…?„ا?+ظة جد?Šدة]]></phrase>
                        <phrase name="pod_tips_manager" date="1277473889" username="pod" version="0.2"><![CDATA[إدارة ?…?„ا?+ظة ا?„?Š?ˆ?…]]></phrase>
                        <phrase name="pod_tips_manager_import" date="1277233313" username="pod" version="0.1"><![CDATA[است?Šراد/تصد?Šر ا?„?…?„ا?+ظات]]></phrase>
                </phrasetype>
                <phrasetype name="Error Messages" fieldname="error">
                        <phrase name="pod_tip_deleted" date="1277061973" username="pod" version="0.0.1"><![CDATA[ت?… ?+ذ?� ا?„?…?„ا?+ظة ب?†جا?+]]></phrase>
                        <phrase name="pod_tip_does_not_exist" date="1277042306" username="pod" version="0.1"><![CDATA[ا?„?…?„ا?+ظة ا?„?…ختارة غ?Šر ?…?ˆج?ˆدة]]></phrase>
                        <phrase name="pod_tip_import_no_new" date="1277245360" username="pod" version="0.1"><![CDATA[ا?„?…?„?� ا?„ذ?Š ت?… است?Šراد?‡ ?„ا ?Š?+ت?ˆ?Š ع?„?‰ أ?Š ?…?„ا?+ظة.]]></phrase>
                        <phrase name="pod_tip_import_nocompat" date="1277242781" username="pod" version="0.1"><![CDATA[ا?„?…?„?� ا?„ذ?Š ت?… است?Šراد?‡ ?Šع?ˆد ?„?†سخة غ?Šر ?…ت?ˆا?�?‚ة ?…?† ?‡ا?ƒ ا?„?…?„ا?+ظات.]]></phrase>
                        <phrase name="pod_tip_import_nofileupload" date="1277245442" username="pod" version="0.1"><![CDATA[ا?„?…?„?� ا?„?…ر?�?ˆع غ?Šر ?…س?…?ˆ?+ ب?‡]]></phrase>
                        <phrase name="pod_tip_import_notips" date="1277242909" username="pod" version="0.1"><![CDATA[ا?„?…?„?� ا?„تذ?Š ت?… است?Šراد?‡ ?„ا ?Š?+ت?ˆ?Š ع?„?‰ ?…?„ا?+ظات]]></phrase>
                        <phrase name="pod_tip_import_x_imported" date="1277245595" username="pod" version="0.1"><![CDATA[ت?… ا?„است?Šراد ب?†جا?+!  {1} ?…?„ا?+ظة جد?Šدة ت?… است?Šراد?‡ا]]></phrase>
                        <phrase name="pod_tip_invalid_tip" date="1277128015" username="pod" version="0.0.1"><![CDATA[?„ا ?Š?ˆجد ?†ص ?„?„?…?„ا?+ظة ا?„?…عر?ˆضة]]></phrase>
                        <phrase name="pod_tip_saved" date="1277057092" username="pod" version="0.0.1"><![CDATA[ت?… ?+?�ظ ا?„?…?„ا?+ظات ب?†جا?+]]></phrase>
                        <phrase name="pod_tips_export_noneselected" date="1277238126" username="pod" version="0.1"><![CDATA[?„?… ?Šت?… است?Šراد أ?ˆ تصد?Šر أ?Š ?…?„ا?+ظة]]></phrase>
                </phrasetype>
                <phrasetype name="Tips of the day phrases" fieldname="pod_tips_html">
                        <phrase name="are_you_sure_want_to_delete_tip_x" date="1277061404" username="pod" version="0.0.1"><![CDATA[ ?…?† أ?†?ƒ تر?Šد ?+ذ?� ?‡ذ?‡ ا?„?…?„ا?+ظة?Ÿ<b>?…تأ?ƒد</b>?‡?„ أ?†ت]]></phrase>
                        <phrase name="pod_edit_tip" date="1277133073" username="pod" version="0.0.1"><![CDATA[تعد?Š?„ ا?„?…?„ا?+ظة]]></phrase>
                        <phrase name="pod_tip_add_new" date="1277505578" username="pod" version="0.2"><![CDATA[أض?� ?…?„ا?+ظة جد?Šدة]]></phrase>
                        <phrase name="pod_tip_allgroups_form" date="1277051294" username="pod" version="0.0.1"><![CDATA[?ƒا?�ة ا?„?…ج?…?ˆعات]]></phrase>
                        <phrase name="pod_tip_edit" date="1277050554" username="pod" version="0.0.1"><![CDATA[ت?+ر?Šر ا?„?…?„ا?+ظة]]></phrase>
                        <phrase name="pod_tip_export_select" date="1277236439" username="pod" version="0.1"><![CDATA[?+دد ?…?„ا?+ظات ?„?„تصد?Šر]]></phrase>
                        <phrase name="pod_tip_groups_form" date="1277051245" username="pod" version="0.0.1"><![CDATA[ا?„?…ج?…?ˆعات
<dfn>?‡ذ?‡ ا?„?…?„ا?+ظة س?ˆ?� تعرض ?„?„أعضاء ض?…?† ا?„?…ج?…?ˆعة ?�?‚ط.</dfn>]]></phrase>
                        <phrase name="pod_tip_noresults" date="1277230217" username="pod" version="0.1"><![CDATA[?„ا ?Š?ˆجد ?†تائج]]></phrase>
                        <phrase name="pod_tip_order" date="1277128263" username="pod" version="0.0.1"><![CDATA[عرض ا?„ط?„ب
<dfn>?‡ذ?‡ ا?„إعدادات ?…تأثرة ?�?‚ط بعرض ا?„ط?„ب ?�?Š ?„?ˆ?+ة ت?+?ƒ?… ا?„إدارة.</dfn>]]></phrase>
                        <phrase name="pod_tip_order_short" date="1277134002" username="pod" version="0.0.1"><![CDATA[ط?„ب]]></phrase>
                        <phrase name="pod_tip_prob" date="1277128335" username="pod" version="0.0.1"><![CDATA[ا?„?ˆز?†]]></phrase>
                        <phrase name="pod_tip_probability_form" date="1277051144" username="pod" version="0.0.1"><![CDATA[ا?„?ˆز?†
<dfn>?‡ذ?‡ ا?„?…?„ا?+ظة س?ˆ?� تعرض ?…ع ?ˆز?† ا?„أ?ˆ?„?ˆ?Šة .ا?„?…?„ا?+ظات با?„?ˆز?† ا?„أ?ƒبر س?ˆ?� تعرض أ?ƒثر.</dfn>]]></phrase>
                        <phrase name="pod_tip_textarea" date="1277050856" username="pod" version="0.0.1"><![CDATA[?†ص ا?„?…?„ا?+ظة]]></phrase>
                        <phrase name="pod_tip_title_form" date="1277050773" username="pod" version="0.0.1"><![CDATA[ا?„ع?†?ˆا?†
<dfn>?Šستخد?… ?„تعر?Š?� ا?„?…?„ا?+ظة ?�?Š ?„?ˆ?+ة ا?„ت?+?ƒ?… ?ˆ?„?Šس ?„?„عرض ?„?„أعضاء.</dfn>]]></phrase>
                        <phrase name="pod_tips_export_file" date="1277233738" username="pod" version="0.1"><![CDATA[اس?… ا?„?…?„?� ا?„?…صدر]]></phrase>
                        <phrase name="pod_tips_export_nonstockgroups" date="1277246334" username="pod" version="0.1"><![CDATA[تصد?Šر ?…?„ا?+ظات ا?„?…ج?…?ˆعات غ?Šر ا?„ا?�تراض?Šة
<dfn>إذا اخترت ?‡ذا ا?„خ?Šار .س?ˆ?� ?Šت?… تصد?Šر ا?„?…?„ا?+ظات أ?Šضا?‹ ?„?„?…ج?…?ˆعات غ?Šر ا?„ا?�ترض?Šة أ?Š ا?„ت?Š أ?†شئت?‡ا أ?†ت</dfn>]]></phrase>
                        <phrase name="pod_tips_export_title" date="1277233553" username="pod" version="0.1"><![CDATA[تصد?Šر ا?„?…?„ا?+ظات]]></phrase>
                        <phrase name="pod_tips_img_title" date="1277312540" username="pod" version="0.2"><![CDATA[?…?„ا?+ظة ا?„?Š?ˆ?…]]></phrase>
                        <phrase name="pod_tips_import_check_duplicates" date="1277247187" username="pod" version="0.1"><![CDATA[ا?�?+ص ا?„?…?„ا?+ظات ا?„?…ت?ƒررة
<dfn>ا?„?…?„ا?+ظة ا?„?…ست?ˆردة س?ˆ?� ?Šت?… ?�?+ص ت?ƒرار?‡ا ,إذا ?ƒا?†ت ت?+?…?„ ?†?�س ا?„ع?†?ˆا?† أ?ˆ ا?„?†ص (?„?„غة ا?„?+ا?„?Šة) ?ˆ?…ج?…?ˆعة ا?„أعضاء ?…تشاب?‡ة ?„?„?…?„ا?+ظات ا?„?…?ˆج?ˆدة.</dfn>]]></phrase>
                        <phrase name="pod_tips_import_file" date="1277232784" username="pod" version="0.1"><![CDATA[ا?„ذ?Š ?Š?+ت?ˆ?Š ع?„?‰ ا?„?…?„ا?+ظات XML أختر ?…?„?� ]]></phrase>
                        <phrase name="pod_tips_import_nonstockgroups" date="1277247265" username="pod" version="0.1"><![CDATA[است?Šراد ?…?„ا?+ظات ?„?„?…ج?…?ˆعات غ?Šر ا?„ا?�تراض?Šة
<dfn>إذا اخترت ?‡ذا ا?„خ?Šار .س?ˆ?� ?Šت?… است?Šراد ا?„?…?„ا?+ظات أ?Šضا?‹ ?„?„?…ج?…?ˆعات غ?Šر ا?„ا?�ترض?Šة أ?Š ا?„ت?Š أ?†شئت?‡ا أ?†ت</dfn>]]></phrase>
                        <phrase name="pod_tips_import_title" date="1277233132" username="pod" version="0.1"><![CDATA[است?Šراد ا?„?…?„ا?+ظات]]></phrase>
                        <phrase name="pod_tips_importexport" date="1277236769" username="pod" version="0.1"><![CDATA[است?Šراد/تصد?Šر ?…?„ا?+ظات ا?„?Š?ˆ?…]]></phrase>
                        <phrase name="pod_tips_manager" date="1277505602" username="pod" version="0.2"><![CDATA[إدارة ?…?„ا?+ظات ا?„?Š?ˆ?…]]></phrase>
                        <phrase name="pod_tips_selall" date="1277237808" username="pod" version="0.1"><![CDATA[ت?+د?Šد ا?„?ƒ?„]]></phrase>
                        <phrase name="pod_tips_tiptitle" date="1277312481" username="pod" version="0.2"><![CDATA[<b style='font-size: 115%'>?…?„ا?+ظة ا?„?Š?ˆ?…</b><br />
]]></phrase>
                </phrasetype>
                <phrasetype name="vBulletin Settings" fieldname="vbsettings">
                        <phrase name="setting_pod_tip_image_path_desc" date="1277310286" username="pod" version="0.2"><![CDATA[?…سار (?…تع?„?‚ با?„د?„?Š?„ ا?„أساس?Š ?„?„?…?†تد?‰) ?„?„ص?ˆرة ا?„ت?Š س?ˆ?� تعرض ?…ع ا?„?…?„ا?+ظات إذا  تر?ƒت?‡ ?�ارغا?‹ ?�?„?† ?Šت?… عرض أ?Š ص?ˆرة]]></phrase>
                        <phrase name="setting_pod_tip_image_path_title" date="1277310236" username="pod" version="0.2"><![CDATA[ا?„?…سار ?„أ?Š?‚?ˆ?†ات ا?„?…?„ا?+ظات]]></phrase>
                        <phrase name="setting_pod_tips_image_style_desc" date="1277310199" username="pod" version="0.2"><![CDATA[?„?Šت?… تطب?Š?‚?‡ ع?„?‰ أ?Š?‚?ˆ?†ات ا?„?…?„ا?+ظات CSS ?…?„?�]]></phrase>
                        <phrase name="setting_pod_tips_image_style_title" date="1277310178" username="pod" version="0.2"><![CDATA[ ?„?„أ?Š?‚?ˆ?†ات CSS ?…?„?� ]]></phrase>
                        <phrase name="setting_pod_tips_setting_active_desc" date="1277140633" username="pod" version="0.1"><![CDATA[ت?�ع?Š?„ ?…?„ا?+ظة ا?„?Š?ˆ?…]]></phrase>
                        <phrase name="setting_pod_tips_setting_active_title" date="1277140633" username="pod" version="0.1"><![CDATA[ت?�ع?Š?„]]></phrase>
                        <phrase name="setting_pod_tips_setting_guest_desc" date="1277230406" username="pod" version="0.1"><![CDATA[إذا اخترت "?†ع?…" س?ˆ?� ?Šت?… عرض ا?„?…?„ا?+ظات ?„?„ز?ˆار غ?Šر ا?„?…سج?„?Š?†]]></phrase>
                        <phrase name="setting_pod_tips_setting_guest_title" date="1277230406" username="pod" version="0.1"><![CDATA[عرض ا?„?…?„ا?+ظات ?„?„ز?ˆار]]></phrase>
                        <phrase name="setting_pod_tips_setting_persistent_desc" date="1277230396" username="pod" version="0.1"><![CDATA[إذا اخترت "?†ع?…" ا?„?…?„ا?+ظة س?ˆ?� تعرض ?�?Š ?ƒ?„ ص?�?+ة ?…عر?ˆضة. إذا اخترت "?„ا" ا?„?…?„ا?+ظات س?ˆ?� تعرض ?�?‚ط ?�?Š أ?ˆ?„ ص?�?+ة ?…?�ت?ˆ?+ة ?…?† ?ƒ?„ ج?„سة.]]></phrase>
                        <phrase name="setting_pod_tips_setting_persistent_title" date="1277230396" username="pod" version="0.1"><![CDATA[?…?„ا?+ظة ?…ست?…رة]]></phrase>
                        <phrase name="setting_pod_tips_setting_unconfirmed_desc" date="1277310157" username="pod" version="0.2"><![CDATA[إذا اخترت "?„ا" ?�أ?† ا?„?…?„ا?+ظات ?„?† تعرض ?„?„أعضاء غ?Šر ا?„?…غع?„?Š?† ?+ت?‰ ?Šت?… ت?�ع?Š?„?‡?… أ?ˆ ا?„?…?ˆا?�?‚ة ع?„?Š?‡?… ?…?† ?‚ب?„ ا?„إدارة]]></phrase>
                        <phrase name="setting_pod_tips_setting_unconfirmed_title" date="1277310112" username="pod" version="0.2"><![CDATA[عرض ا?„?…?„ا?+ظات ?„?„أعضاء غ?Šر ا?„?…غع?„?Š?†]]></phrase>
                        <phrase name="settinggroup_pod_tips_settings" date="1277134026" username="pod" version="0.0.1"><![CDATA[إعدادات ?…?„ا?+ظة ا?„?Š?ˆ?…]]></phrase>
                </phrasetype>
        </phrases>
        <options>
                <settinggroup name="pod_tips_settings" displayorder="10010">
                        <setting varname="pod_tips_setting_active" displayorder="10">
                                <datatype>boolean</datatype>
                                <optioncode>yesno</optioncode>
                                <defaultvalue>0</defaultvalue>
                        </setting>
                        <setting varname="pod_tips_setting_persistent" displayorder="20">
                                <datatype>free</datatype>
                                <optioncode>yesno</optioncode>
                                <defaultvalue>0</defaultvalue>
                        </setting>
                        <setting varname="pod_tips_setting_guest" displayorder="30">
                                <datatype>boolean</datatype>
                                <optioncode>yesno</optioncode>
                                <defaultvalue>0</defaultvalue>
                        </setting>
                        <setting varname="pod_tips_setting_unconfirmed" displayorder="40">
                                <datatype>boolean</datatype>
                                <optioncode>yesno</optioncode>
                                <defaultvalue>0</defaultvalue>
                        </setting>
                        <setting varname="pod_tip_image_path" displayorder="50">
                                <datatype>free</datatype>
                        </setting>
                        <setting varname="pod_tips_image_style" displayorder="60">
                                <datatype>free</datatype>
                                <defaultvalue>float: left; margin-right: 5px;</defaultvalue>
                        </setting>
                </settinggroup>
        </options>
        <helptopics>
        </helptopics>
        <cronentries>
        </cronentries>
        <faqentries>
        </faqentries>
</product>

anyways thank you keep it up:up:

Pod 07-06-2010 03:06 PM

When you have translated the phrases in your own vb (or your test installation), then go to languages & phrases, then export your language for the product. That is the language file that I mean.

I can't support anyone that has installed a product file not provided by me (and, actually, I don't give permission to redistribute this mod in particular). So re-exporting the product is not the right way to provide translations.


All times are GMT. The time now is 12:41 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01803 seconds
  • Memory Usage 2,042KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete