vb.org Archive

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

Dan Flynn 10-10-2002 02:13 PM

Thanks this is sweet. Your hacks are always useful and great!

Wildthinks 10-10-2002 03:51 PM

Quote:

Originally posted by Logician

Did you see my default text correctly when you installed the hack?

And BTW. you should use "Hi $bbuserinfo[username],", not "$bbuserinfo[usergroupid]" ;)

The conditional woorks fine, but I see only


Congratulations $bbuserinfo[username]! You have successfully installed Dynamic Forum Home Announcements Hack Now you can login to your Admin CP/Choose VB settings and configure the announcements you want to set according to different conditions. BTW. This announcement is visible to only Site Admins.. Logician

:-/

Logician 10-10-2002 04:33 PM

Quote:

Originally posted by Wildthinks

The conditional woorks fine, but I see only Congratulations $bbuserinfo[username]!

This is weird.. I have never heard such a complaint before and I can not see a reason which will cause this problem. I dont know what can I suggest for you except checking the installation instructions again to make sure you applied the code correctly. If you cant find anything wrong and still want to use the hack, I can try to debug it in your site if you can give me FTP and Admin CP access to your board.

Sorry Tom, this is all I can do at the moment..

Dean C 10-10-2002 05:30 PM

just an idea Logician... instead of having this done via the "Vbulletin Options" ...

it would be far easier to have a seperate option on the nav bar on the left of the admin cp... :)

- miSt

Logician 10-10-2002 06:31 PM

Quote:

Originally posted by Mist
just an idea Logician... instead of having this done via the "Vbulletin Options" ...

it would be far easier to have a seperate option on the nav bar on the left of the admin cp... :)

Integrating it to vb settings has an advantage though: Since the settings are already loaded everytime a vb page is called, there is no extra SQL connection that this hacks creates since the announcement is loaded with vb settings. If we seperated it from that section (I mean in db), the hack would add 1 extra SQL query to forum home. ;)

digitalJE5U5 10-11-2002 07:34 AM

Man I love this thing! It's so sweet!

One small thing.

How can I make the box where you edit the code LARGER?

It's a real hassle trying to type in a lot of code into this tiny box, and if I write the code in notepad, it really screws up the formatting.

Great work, though.

/DJ

Logician 10-11-2002 05:05 PM

Quote:

Originally posted by digitalJE5U5
How can I make the box where you edit the code LARGER?

yeah good idea: :)

Edit admin/options.php find:
PHP Code:

} elseif ($setting[optioncode]=="textarea") { 

BEFORE that add:
PHP Code:

// Logician Dynamic Forum Home Announcement Hack
      
} elseif ($setting[optioncode]=="textarea" AND $setting[varname]=='dynamic_fha') {
        echo 
"<textarea name=\"setting[$setting[settingid]]\" rows=\"30\" cols=\"70\">".htmlspecialchars($setting[value])."</textarea>";
// Logician Dynamic Forum Home Announcement Hack 

Now it becomes like this:

Logician 10-11-2002 09:34 PM

IMPORTANT NOTICE FOR V.2.2.8 (OR LATER) USERS:

As I mentioned in the conditional help message , I have discovered a bug in vbulletin while coding this hack. I coded the hack in 2.2.6 and 2.2.7 and report the bug in vbulletin.com. Vbulletin 2.2.8 fixed the bug I reported but I have recently discovered that while fixing the issue, 2.2.8 might also be clashing with my hack since it changed the way you insert texts to vb settings page.. :cool:

I'm not a 2.2.8 user (yet), so can't provide you with a 100% tested solution, but if you want to use this hack in your board, I believe this should work for you:

Install the hack as mentioned in the instructions. If it does not work as it should be (for example you might see $bbuserinfo[username] instead of your name in the test announcement) then IN STEP 4 use this code instead of the code in the instructions:
PHP Code:

// Logician Dynamic Forum Announcements Hack
$dynamic_fha=strchr($optionstemp['template'],'$dynamic_fha = "');
$dynamic_fha=str_replace('\$''$'$dynamic_fha);
eval(
$dynamic_fha);
$dfh_announcement=dynamic_a($dynamic_fha);
// Logician Dynamic Forum Announcements Hack 

(Notice the one extra line)

(THIS CODE IS FOR 2.2.8 (OR LATER) USERS, DO NOT APPLY THIS IF YOU ARE USING vb VERSION <2.2.8!)

This should cure the problem and I believe you can use the hack without any problems in your board too.

Enjoy..

Wildthinks 10-12-2002 03:03 PM

BIG BIG BIG THX.... for your help

:laugh: :banana: :laugh:

Dean C 10-16-2002 03:53 PM

Quote:

Originally posted by Logician

Integrating it to vb settings has an advantage though: Since the settings are already loaded everytime a vb page is called, there is no extra SQL connection that this hacks creates since the announcement is loaded with vb settings. If we seperated it from that section (I mean in db), the hack would add 1 extra SQL query to forum home. ;)

lol always one step ahead of us ;)

- miSt


All times are GMT. The time now is 04:58 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.01266 seconds
  • Memory Usage 1,755KB
  • 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
  • (3)bbcode_php_printable
  • (5)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