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 - NJAquaman - Notices THIS_SCRIPT Criteria (https://vborg.vbsupport.ru/showthread.php?t=232137)

NJAquaman 01-03-2010 10:00 PM

NJAquaman - Notices THIS_SCRIPT Criteria
 
1 Attachment(s)
What: A Product To Give you THIS_SCRIPT Criteria for Notices.

WORKS WITH ..!!!
4.0.x

Install:

1) Navigate to ACP > Plugins & Products > Manage Products > Add/Import Product
2) Install the "NJAquaman - Notices THIS_SCRIPT Criteria" Product.
3) Navigate to Notices > Add New Notice
4) At the Bottom you can determine to show on certain page with the THIS_SCRIPT defined

5) To Define THIS_SCRIPT go to any "PHP" file on you forum and download and open it
you will see something like this "define('THIS_SCRIPT', 'profile'); " . The "profile" is the
THIS_SCRIPT name and thats what your going to use for the Notice is you want it to show, on that page.

The Way this works is when you Create Notice you may only show it on a php page of your choice . Say you want to put the notice only on the Profile page. So you check
THIS_SCRIPT code in the member.php and it says "member". Then put the "member" in the
field that is given when creating a notice. Now it will only show up on the
memer.php/profile pages. All other Criteria will also work when this is enabled.


If all You wanted Not on THIS_SCRIPT Download This Version
- NJAquaman - Notices THIS_SCRIPT Criteria (NOT THIS_SCRIPT)


Demo:
Attachment 109053


DONT FORGET TO CLICK INSTALL


__________________________________________________ ______________
Change Log
v1.1 - 01/04/10
- Added the Not THIS_SCRIPT Version (KALL)
__________________________________________________ ______________

Charlie98902 01-04-2010 12:11 PM

Can we get a better explanation? Also a screen shot of it in use would be nice as well.

Edrondol 01-04-2010 12:57 PM

Basically it looks like when you download this it adds the criteria for Notices. Right now the way you do Notices is...interesting. Like you have to say the those who see it are NOT of Group X, etc. One thing I've noticed is that there is NO CHOICE for "Let Everyone See This Notice"!

So if I'm reading this right, picking this criteria says, "Let every see this if this script is this script." Which mean everyone sees it.

It could just as well be labeled "Show to Everyone" but this works, too.

Charlie98902 01-04-2010 01:09 PM

So I could use this notice and say if profile fieldx isn't met show? As I have a mandatory profile field on my forum.

barcena 01-04-2010 01:58 PM

Can we have an screenshot or a demo site? I have no idea yet as what this exactly does.

Thanks :)

NJAquaman 01-04-2010 02:44 PM

Quote:

Originally Posted by barcena (Post 1946913)
Can we have an screenshot or a demo site? I have no idea yet as what this exactly does.

Thanks :)

Quote:

Originally Posted by Charlie98902 (Post 1946878)
So I could use this notice and say if profile fieldx isn't met show? As I have a mandatory profile field on my forum.

Quote:

Originally Posted by Edrondol (Post 1946869)
Basically it looks like when you download this it adds the criteria for Notices. Right now the way you do Notices is...interesting. Like you have to say the those who see it are NOT of Group X, etc. One thing I've noticed is that there is NO CHOICE for "Let Everyone See This Notice"!

So if I'm reading this right, picking this criteria says, "Let every see this if this script is this script." Which mean everyone sees it.

It could just as well be labeled "Show to Everyone" but this works, too.

Quote:

Originally Posted by Charlie98902 (Post 1946848)
Can we get a better explanation? Also a screen shot of it in use would be nice as well.



The Way this works is when you Create Notice you may only show it on a php page of your choice .

Example >> Say you want to put the notice only on the Profile page. So you check
THIS_SCRIPT code in the member.php and it says "member". Then put the "member" in the
field that is given when creating a notice. Now it will only show up on the
memer.php/profile pages. All other Criteria will also work when this is enabled.


Example2 >> Say You Want it to only display in the CMS. You use "vbcms" as the
THIS_SCRIPT code when making a Notice. Then it will only show on the CMS.


If you have any more question Please ask, i will be Glad to help!

This is a simple Mod so i suggest trying it out !! Then you may click install later!

Thanks

aj8690 01-04-2010 03:53 PM

I would install if this had a "this script is NOT" :)

That would be wonderful. Thanks!

Edrondol 01-04-2010 04:35 PM

I love being wrong. :(

I can see how this could be useful, though. If only I used notices more...

kall 01-04-2010 04:38 PM

Quote:

Originally Posted by aj8690 (Post 1947002)
I would install if this had a "this script is NOT" :)

That would be wonderful. Thanks!

If all you wanted was 'is not THIS_SCRIPT', just change the logic in this line:

PHP Code:

    if ($conditions[0] != THIS_SCRIPT

to
PHP Code:

    if ($conditions[0] == THIS_SCRIPT


NJAquaman 01-04-2010 04:59 PM

Quote:

Originally Posted by kall (Post 1947030)
If all you wanted was 'is not THIS_SCRIPT', just change the logic in this line:

PHP Code:

    if ($conditions[0] != THIS_SCRIPT

to
PHP Code:

    if ($conditions[0] == THIS_SCRIPT



This is Great thanks KALL!


All times are GMT. The time now is 08:41 AM.

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.01151 seconds
  • Memory Usage 1,750KB
  • 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
  • (4)bbcode_php_printable
  • (6)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
  • (10)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