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.

joeychgo 05-04-2004 12:34 AM

How about having the text in colors?

Logician 05-04-2004 06:03 AM

Quote:

Originally Posted by joeychgo
How about having the text in colors?

What about it? You can use bbcode or HTML so it is possible.

Yahhoon23 05-05-2004 05:09 AM

Great Hack Logician. Installed perfectly on the first try and using your 2nd post in this thread helps alot with people that don't have the greatest understanding of your conditionals.

Nonetheless it has worked flawlessly with me.

*Clicked Install.

subu1 05-09-2004 07:02 AM

very fine thxxxx, *click install*

Fibe 05-11-2004 11:45 AM

Is there any way to make the text scroll across the box ?

And how do i resize the popup box? it's a bit huge hehehe.

New at this, so sorry if they are dumb questions.

the Sandman 05-11-2004 12:29 PM

Quote:

Originally Posted by Fibe
Is there any way to make the text scroll across the box ?

HTML is allowed so try simply putting <marquee> </marquee> tags around your announcement text.

Logician 05-11-2004 01:52 PM

Quote:

Originally Posted by Fibe
And how do i resize the popup box? it's a bit huge hehehe.

You can play with the css setting in the dfh_announcement_popup template to change the color/size/location etc. of popup box.

Fibe 05-11-2004 02:27 PM

Ok firefox messed the popup up thats why.

However i can't seem to find the values to change size for in that template :(

NuclioN 05-14-2004 09:43 AM

Great function Logician! I wonder if it is possible to show or popup calendar events. Now i know that it is rather boring to look at an event-popup the whole day so i hope there is a way to do this with a controled popup, but if this is impossible an event announcement would be very nice! :)

mtha 05-15-2004 06:21 PM

Logician, how many query it'd add to the process?

I'd love to play with this, but I dont wanna slow down my board :D

Logician 05-15-2004 06:26 PM

Quote:

Originally Posted by mtha
Logician, how many query it'd add to the process?

I'd love to play with this, but I dont wanna slow down my board :D

none! ;)

Mobo 05-15-2004 10:08 PM

This hack really rocks!! It's the best way to keep my staff up to speed that I have found so far. Thanks!!

brandy 05-16-2004 02:09 AM

Cool hack, I've downloaded it, but haven't installed it yet. When I do I'll click Install.

I was wondering if anyone new how to do the following with it:

I would like a pop up window that displays the 3 paid subscriptions that I offer (bascially the "Available Subscriptions" box.) I would like a person to be able to click to pay for a subscription in the pop up, and then have the pop up close and open the available payment page in the MAIN forum window (where the pop up originated).

Anyone?

Kwak 05-16-2004 03:25 AM

I should install this hack next weekend.

poolking 05-16-2004 07:22 AM

Great looking hack, I'll install it later. :D

brandy 05-16-2004 11:32 PM

This is a great hack!

How do the conditionals work regarding PRIMARY usergroups and SECONDARY usergroups?

For instance, I have a primary registered usergroup ID: 2
and a secondary contributing member usergroup ID: 10

I want usergroup "2" to get an announcement that asks them to donate.

When they donate, they are still in usergoup "2" but now also have a secondary usergroup "10" for contributing member.

I want usergroup "10" to have an announcement that thanks them, without having the announcement that asks them to donate.

Is there a way to do this?

Thanks,
Brandy

zetetic 05-18-2004 03:44 AM

Great hack!

One thing... it took me an obscenely long time to figure this out, but there's a semicolon missing from the pop-up template that causes some ugly formatting:

"padding: 10px; overflow:"

Thanks!

Aurous 05-18-2004 04:40 PM

Something doesnt look right. I need help:

I am trying to install this in one of my testboards before applying it to my main bb. The testvb folder is password protected by htaccess.

After following first step:
Replacing

if ($debug)

with:

// Logician Hack: Always debug on while adding a setting
$debug=1;
// Logician Hack: Always debug on while adding a setting
if ($debug)

YES, I know there are 2 instances of "if ($debug)", which I replaced with the above text and saved the changes in my server.

After that, when I go to:

http://YOUR_SITE_URL/FORUM_URL/admincp/options.php?do=addgroup

I see a blank white page!! I dont want to mess around with my live site and would like to make changes in my test forum first. I dont understand whats wrong here. Any help??

Logician 05-18-2004 05:08 PM

Quote:

Originally Posted by Aurous
After that, when I go to:

http://YOUR_SITE_URL/FORUM_URL/admincp/options.php?do=addgroup

I see a blank white page!!

Obviously you edit the url in http://YOUR_SITE_URL/FORUM_URL/admin...hp?do=addgroup right?

Aurous 05-18-2004 05:36 PM

obviously, you think the users here are retarded!

And to ur question, ofcourse NOT! I used proper URL. Infact the strange thing is that, when I removed $debug=1; in both instances and saved it. I clicked on vBulletin Options in the admincp and I saw blank page as well!! Then I just copied the options.php from the live site to the testvb/admincp folder and it worked fine, when both the files had the same content! This is something very new to me. I even tried logging again and didnt see any difference.

Logician 05-18-2004 05:54 PM

Quote:

Originally Posted by Aurous
obviously, you think the users here are retarded!

This has nothing to do about intelligence. We have users with every kind of experience here so I got used to ask the obvious questions first.

I'm not sure what is the problem in your case but I am safe to say it is related to your end. It sounds like a editor problem to me so you can try using the notepad to hack the file for starters.

Aurous 05-18-2004 06:01 PM

I am editing files via ssh (putty), this has nothing to do with it.

Logician 05-18-2004 06:11 PM

Quote:

Originally Posted by Aurous
I am editing files via ssh (putty), this has nothing to do with it.

This sounds like your problem. Try to download it to your localcomputer first, edit it via notepad, then upload it back. Very likely problem will go.

Aurous 05-18-2004 06:33 PM

I am extremely sorry. It was a problem on my side. The hack is working great! Notepad saved the day after all :tired: Once again, I apologize.

Also, thanks a lot for this wonderful hack!

Logician 05-18-2004 06:45 PM

np glad you solved the problem. ^^

Aurous 05-19-2004 04:56 AM

a quick question:

How do I uninstall this hack? Not that there is anything wrong with it, but I need to make some changes on my site, uninstall a few hacks and then reinstall this hack.

Please let me know.

Thanks

Aurous 05-19-2004 06:05 AM

also whats $debug=1; for?

can I remove it after installing this hack?

Logician 05-19-2004 06:06 AM

Quote:

Originally Posted by Aurous
a quick question:

How do I uninstall this hack? Not that there is anything wrong with it, but I need to make some changes on my site, uninstall a few hacks and then reinstall this hack.

Just revert the hack codes from the script. Then to remove the hack settings from options follow this instruction.

Logician 05-19-2004 06:08 AM

Quote:

Originally Posted by Aurous
also whats $debug=1; for?

can I remove it after installing this hack?

https://vborg.vbsupport.ru/showpost....5&postcount=50

Logician 05-19-2004 06:16 AM

Quote:

Originally Posted by tmhall
Great hack!

One thing... it took me an obscenely long time to figure this out, but there's a semicolon missing from the pop-up template that causes some ugly formatting:

"padding: 10px; overflow:"

Thanks!

This small bug is fixed and instructions are updated. Thanks to tmhall.


All times are GMT. The time now is 08:20 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.01677 seconds
  • Memory Usage 1,830KB
  • 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
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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