vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals (https://vborg.vbsupport.ru/showthread.php?t=64189)

Gio Takahashi 04-25-2004 09:49 PM

Seems that I get a blank page on index.php (forum not admincp) everytime I make an announcement.

ixian 04-26-2004 01:48 AM

Quote:

Originally Posted by Gio Takahashi
Seems that I get a blank page on index.php (forum not admincp) everytime I make an announcement.

I know you're going to get tired of hearing this, but I'm gonna say it anyway - you missed something important/messed up a step.

Go back to the original versions of the files and do it again line by line. You missed something - a quote, a comma, a ;, something, I guarentee it. Either that or you did the edits with a crappy editor like Notepad which inserted invisible line breaks for you.

Logician 04-26-2004 06:55 AM

Quote:

Originally Posted by ixian
I know you're going to get tired of hearing this, but I'm gonna say it anyway - you missed something important/messed up a step.

Go back to the original versions of the files and do it again line by line. You missed something - a quote, a comma, a ;, something, I guarentee it. Either that or you did the edits with a crappy editor like Notepad which inserted invisible line breaks for you.

yes either as ixian said or it is your vb version. As far as I can see you are using "RC" and I haven't tested this hack with vb versions prior to 3.0.0 as I mentioned in the instructions.

ranger2kxlt 04-28-2004 01:38 PM

Never mind.....

AWESOME HACK! Thanks!!

ranger2kxlt 04-28-2004 02:25 PM

How do we use the field id part? I've tried numeours codes and can't get this to work.....??

Thanks

Gio Takahashi 04-28-2004 04:22 PM

Actuall yI forgot to update my user option, I'm using 3.0.0, thanks for reminding me to update that.

As for the editor I used. I have Erwin's vBFTP installed, which comes with a built in editor for php and such. Obviously I used that editor. I'll give it a try again.

Gio Takahashi 04-28-2004 04:38 PM

Hmm, seems that I skipped function.php or something while I edited this, I was sure I edited it right. Oh well.

WEForums 04-30-2004 02:20 AM

Anyone know a simple way to make this work for all pages?

I've made the HTML for a quick registration and it's displayed through the DHTML announcement. It'd be nice to have it enabled on all pages. I don't currently have the time to look at the editing which is why I ask.

mtha 05-03-2004 04:46 AM

Cool hack

Quote:

Originally Posted by Logician
You can use conditionals together too. Here is an example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[[($bbuserinfo[userid]==32)]] Announcement 1 [[/($bbuserinfo[userid]==32)]]
[[($bbuserinfo[usergroupid]==3)]] Announcement 2 [[/($bbuserinfo[usergroupid]==3)]]
Announcement 3
-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If you set this text as your announcement, the hack will:
Show Announcement 1, if user's userid = 32
Show Announcement 2, if user's usergroupid = 3 (=email confirmation waiting members)
show Announcement 3, For ALL other users

What if user 32 is also from user groupid 3? He will be displayed Announcement 1 because even if he matches both conditional 1 and conditional 2, conditional 1 (which is above) has a higher priority.

Can you make it display both (all) announcements (1+2+3) if user32 is also from usergroupid3? or will you have any plan to make it posible


Quote:

STEP 1 - Edit admincp/options.php,find:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if ($debug)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Replace it as: (Important : there are 2 instances of this line in options.php. Make sure you replace BOTH!)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// Logician Hack: Always debug on while adding a setting
$debug=1;
// Logician Hack: Always debug on while adding a setting
if ($debug)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Upload the file into the server NOW. (Important : before you proceed to step 2 make sure you upload hacked options.php in step 1!)
Should we remove these $debug=1 after installation? (upload the original file, maybe?)

Logician 05-03-2004 09:14 AM

Quote:

Originally Posted by mtha
Can you make it display both (all) announcements (1+2+3) if user32 is also from usergroupid3? or will you have any plan to make it posible

You can create a conditional for this and put all 3 announcements in it. ;)

eg.
[[($bbuserinfo[userid]==32 AND $bbuserinfo[usergroupid]==3)]] Announcement 1
Announcement 2
Announcement 3
[[/($bbuserinfo[userid]==32 AND $bbuserinfo[usergroupid]==3)]]


Quote:

Originally Posted by mtha
Should we remove these $debug=1 after installation? (upload the original file, maybe?)

It is upto you. It does not hurt if you don't and it does not hurt if you do. But if you want a technical suggestion, I say leave it "hacked", it is better this way if you later decide to add an option to vbsettings. Because the hacked version allows you to make the setting perminent.


All times are GMT. The time now is 02:28 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.01294 seconds
  • Memory Usage 1,745KB
  • 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
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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