The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
Notices Criteria - Additional Conditions for Displaying a Notice Details »» | |||||||||||||||||||||||||||||||
Notices Criteria - Additional Conditions for Displaying a Notice
Developer Last Online: Sep 2020
What is it?
---------------------------- This mod adds new criteria that can be used to configure when a notice will be displayed or not. (These came from separate requests in the forums which I decided to release as one mod.) 1) Show notice only on one or more days of the week 2) Show notice for any style other than one selected style 3) Show notice only for specified threadids (in this case the notice will on display on the showthread and newthread pages). 4) Show notice if THIS_SCRIPT value is (or is not) in specified list of values 5) Show notice if user has been registered for more/less than a certain number of days 6) Show notice only during certain months 7) Show notice only when user is/is not browsing selected forums (this duplicates the functionality of the standard functions, but adds flexibility). Installation: ---------------------------- Just import the product XML file from the Product Manager. The new criteria will appear when adding or editing a notice in the Notices Manager. Notes: 1) Should work on 3.X and 4.X versions. 2) Since notices aren't shown on the register.php page, adding "register" for the "THIS_SCRIPT value is" option will not work. If you want to show notices on the register page, you must edit the navbar template and remove the check for THIS_SCRIPT != 'register'. History: ---------------------------- 1.2 (May 18, 2014)
Download Now
Screenshots
Show Your Support
|
Comments |
#52
|
|||
|
|||
No problem. I was looking at it yesterday. There's a slight problem with using it for ads because although the same hooks are there, the condition checking doesn't work the same way, so I can't just use the same code.
Anyway, I'll see if I can get to it today. BTW, I don't mind adding ads to this mod, but unlike notices, I think you can handle any ad conditions you want by putting template <vb:if ... tags around the code in the ad manager (so if it's really holding you up, you don't need to wait for this). |
#53
|
|||
|
|||
Thanks a lot for helping; I'm not really a programmer so am not quite sure how to use the vb if tags, especially when trying to exclude a particular subforum. Hope you can get it in; as I mentioned the exclusion of a particular forum is the more important one. Ads would be a nice add on
|
#54
|
||||
|
||||
This thread will help you https://vborg.vbsupport.ru/showthread.php?t=215032 the actual condition you are looking for is
HTML Code:
<if condition="!in_array($forum['forumid'], array(1,2,3,6))">DO SOMETHING</if> if NOT in this array of forumid's then DO SOMETHING. If you use it like this HTML Code:
<if condition="in_array($forum['forumid'], array(1,2,3,6))">DO SOMETHING</if> |
#55
|
||||
|
||||
I haven't had a chance to install this, but I'm going to once I get my existing modifications sorted out. By any chance, would you consider adding a notice that targets browser versions (notably versions of IE)?
|
#56
|
|||
|
|||
I could do that, if I can find patterns to match the user agent string for each version.
|
#57
|
||||
|
||||
You really only need to turn strings on and off
For targeting IE Users: <!--[if IE]> Place Content here for Users of Internet Explorer. <![endif]--> For targeting all others: <![if !IE]> Place Content here for Users of all other Browsers. <![endif]> The Conditional Comments can only be detected by Internet Explorer, all other Browsers thread it as normal Comments. To target IE 6,7 etc.. You have to use "Greater Then" or "Lesser Than" in the If Statement. Like this. Greater Then: <!--[if gte IE 7]> Place Content here for Users of Internet Explorer 7 or above. <![endif]--> Lesser Then: <!--[if lt IE 6]> Place Content here for Users of Internet Explorer 5 or lower. <![endif]--> You can do the same for other specific browsers like geko....etc |
Благодарность от: | ||
blind-eddie |
#58
|
||||
|
||||
Testing this now on 3.8.7, and it seems to work, with the exception that THIS_SCRIPT entries don't remain in the Admin CP when I reload the Notice. They work. And they appear to continue to working after saving. But if I edit that notice, I have to remember to put the script name back in.
If I might make another request, have you considered adding in NOT THIS_SCRIPT? I remember this coming in handy with another modification I had installed. If not, no biggie. |
#59
|
|||
|
|||
Quote:
Quote:
|
#60
|
||||
|
||||
Whoops! Didn't see that menu. I'm on 3.8.7 and have another Notices mod disabled. I'll uninstall it and see if that's the issue.
|
#61
|
|||
|
|||
What would be the possibility of getting a Month of the Year option?
My coding skills are ... well, they are nonexistent. I tried to mess with the XML myself with much failure. We have active users and we have semi-active users and I am trying to set up a "Notice of the Month." This way someone who logs in anytime in the month of June will see the notice, and can dismiss it at their leisure. When July comes around, I'll have a new notice for that month. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|