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)

Logician 09-16-2002 07:25 PM

Quote:

Originally posted by Willard Reece
If I go to another pc , I can't even log on as myself.

ok follow the suggestions above and let's see what will happen..

Willard Reece 09-16-2002 07:32 PM

Ok i did a few things and now it acts like it did right after I put on the vp add on. and what it does now is right after you log on it takes you to a blank page and if you click on the reecefamilies.com on the simi blank page it takes you to the pages.

Weird one huh.
after I put on your hack I put up some games ka flash type, tetris.swf.
not sure if it caused a prob but I got rid of it.
As soon as I get the one prob that is left I will put back on the
Dynamic Forum Announcements Hack , I loved it.

Brad 09-16-2002 07:34 PM

Logician, you just saved me alot of time. :laugh: awsome hack man. ill be using this.

Willard Reece 09-16-2002 08:01 PM

I think my prob is with vp.

You can't log on from the log on screen but if I turn on unregistered can view forums then on the vp home page you can go to the log on area and log on with no prob....

So now to go to a different area and look for vp log on problems.

Thanks Logician

I'm going to reinstall the hack as soon as I fix this prob.

Willard
reecefamilies.com

Logician 09-16-2002 08:09 PM

Quote:

Originally posted by Willard Reece
I think my prob is with vp.

Thanks Logician

@Willard Reece : yw.. Actually I was kinda sure it was not related to my hack because it does not touch member.php which gives you the headache.. Glad you fixed the issue..

@Anime-loo: thx pal..

Willard Reece 09-16-2002 08:23 PM

So far I havn't found any help on this tho..

remembering back to the install of vp I had this prob after the install.

RayMatrix 09-17-2002 06:55 PM

Can anyone please tell me why this code wont work ?

Code:

[[($bbuserinfo[userid]==180)]]
Hallo $username,

nice to see you here today.
[[/($bbuserinfo[userid]==180)]]

Only the User with ID 180 can see this announcement, but in the Textfield it will no display his NICKNAME :(

All tips are welcome !


Ohh, Logician, very nice and functional hack !!!

Logician 09-17-2002 07:46 PM

Quote:

Originally posted by RayMatrix
Only the User with ID 180 can see this announcement, but in the Textfield it will no display his NICKNAME :(

Try:

Hallo $bbuserinfo[username]

;)

RayMatrix 09-17-2002 07:51 PM

THANKS !!!!

ptbyjason 09-20-2002 12:25 AM

Any reason why I would be getting the following error at the top of my forum?

Quote:

Parse error: parse error, unexpected T_MINUS_EQUAL in /business/bclapp/html/vbulletin/admin/functions.php on line 2407
My line 2407 in admin/functions/php is
PHP Code:

$postinfo getpostinfo($postid); 


Logician 09-20-2002 07:15 AM

Quote:

Originally posted by ptbyjason
Any reason why I would be getting the following error at the top of my forum?
[/PHP]

Delete your announcement box and try again. It is very likely because you set an a invalid /wrong sytnaxed conditional.. If it so, correct your conditional..

If your problem continiues after deleting your announcement box, I would say it's not related to this hack, but to make sure delete the hack code you added to global.php. This is very close to uninstall and if the hack is your problem, it will be solved in this step.

ptbyjason 09-20-2002 09:54 PM

I am pretty sure it is the hack. Whenever I go back and replace the original php files, and make no other changes, the error is gone from the board. I can use just a text message and get the error not only on my board but also in the admin panel. Any thing I can do to make the hack work without the error? I really like this one.

Logician 09-20-2002 10:07 PM

Quote:

Originally posted by ptbyjason
I am pretty sure it is the hack. Whenever I go back and replace the original php files, and make no other changes, the error is gone from the board. I can use just a text message and get the error not only on my board but also in the admin panel. Any thing I can do to make the hack work without the error? I really like this one.
1- Do you get any errors when you clear announcement box? If no, what announcement have you inserted?
2- Do you get any errors when you delete the hack code from global.php? (only from global.php!)
3- What's your vb version?

ptbyjason 09-21-2002 12:45 AM

Quote:

Originally posted by Logician

1- Do you get any errors when you clear announcement box? If no, what announcement have you inserted?
2- Do you get any errors when you delete the hack code from global.php? (only from global.php!)
3- What's your vb version?


1. Yes, still get them.
2. I cannot find the code to delete in global.php :(
3. I am running 2.2.6

Something else I just noticed. When I have the 3 modified php files uploaded, the avatars do not appear in the postbit. Does that give a hint to the problem at all?


Logician, thank you for taking the time to help me with my problem.

Logician 09-21-2002 06:46 AM

Quote:

Originally posted by ptbyjason
Something else I just noticed. When I have the 3 modified php files uploaded, the avatars do not appear in the postbit. Does that give a hint to the problem at all?

Frankly, I strongly believe that your problem is not related to this hack (unless it's clashing with another hack) because a problem in postbit (showthread.php) seems to have nothing to do with this hack. When you load your postbit you are dealing with showthread.php and its not even modified. Your uploading the old files correcting your problem makes me thing if you applied the hack correctly or not. Please double check this. If you cant figure out the problem and still want to use the hack, I can try to trace it if you can give me FTP access to your site and access to Admin CP.

geniuscrew 09-24-2002 12:42 AM

Nice hack but i'm getting this error:

Fatal error: Call to undefined function: dynamic_a() in /home/******/public_html/forum/index.php on line 13

Logician 09-24-2002 08:09 AM

Quote:

Originally posted by geniuscrew
Nice hack but i'm getting this error:

Fatal error: Call to undefined function: dynamic_a() in /home/******/public_html/forum/index.php on line 13

geniuscrew make sure you applied installation STEP 2 correctly. You should insert the code in that step to "admin/functions.php" (that is "functions.php" in the "admin" dir), NOT "adminfunctions.php".

LawnDawg 09-24-2002 07:08 PM

Hmm, ok, I followed all the instructions properly.. cept nothing's showing up on my forum home..

Help please =\

Logician 09-24-2002 07:23 PM

Quote:

Originally posted by LawnDawg
Hmm, ok, I followed all the instructions properly.. cept nothing's showing up on my forum home..

Help please =\

Have you gone to VB Settings and choose "SAVE CHANGES" after the installation? If yes, make sure:
1- you have created the template ""dfh_announcement" in all your template sets.. Also make sure the template content is correct..
2- You applied the hack code correctly to index.php and functions.php.
3- You put "$dfh_announcement" to the correct place in forumhome template (once again put inside all templates set's forum home, if you have more than 1)

LawnDawg 09-24-2002 10:01 PM

Yeesh, that was odd.

I changed the announcement right after I installed it.

Didn't work. I changed it again just now, & it works.

Thx Logi.

[edit]Is there any way I could add this into my "header" template? does seem to work.. [/edit]

Logician 09-25-2002 08:09 AM

Quote:

Originally posted by LawnDawg
[edit]Is there any way I could add this into my "header" template? does seem to work.. [/edit]
I havent tested it with header template but I cant see a reason it wouldnt work. Just make sure you delete the code from index.php and add it to global.php as mentioned in the install instructions.. Not tested, should work though..

But if you need to use conditional power inside your header template (or any other template) I suggest you checking my Advanced Templates hack either..(Please find it in my profile). You can set conditionals inside your header (or any other template) and if you want you can set announements there too..

2 methods, choose your pick! ;)

RayMatrix 09-25-2002 04:40 PM

. . .but got this Error Message:

Warning: Failed opening '/home/ish/install.php' for inclusion (include_path='.:/usr/share/php') in Unknown on line 0

This comes up when running the DFHA_install.php

The File ist in the Board root Folder, the Board work and its php4.1.x installed.

Any Ideas ?

Willard Reece 09-25-2002 05:19 PM

RayMatrix
permissions for that folder and file?
Do you have that dir and or file chd to 777 so you can run it.
If its not, then it will do that too.

RayMatrix 09-25-2002 07:24 PM

. . .thats it. . .the simplest things are most time the hardest :paranoid:

THANKS !!

PIMPY 09-29-2002 02:56 AM

You maze me yet again Logi, I now have three of your additions on my forums, Currently i'm trying to get them integrated and working, but they are on and working.

Only questions I have are..

Simple: How can I find the usergroup IDs? (i'm sure its very simple and I'm sure I could just create a small bit of PHP to tell me, but hey, why screw up when ya'll are so smart)

and two..

Would it be possible to somehow get more conditionals working at one time? I know you say it can't be done in all of your readmes, but I'm sure there is a way for it to parse each thing not just do one then stop. I havn't looked but I'm assuming that the general code is similar to
If conditional1 is true end, else goto next bit

but could it be possible to do

if conditional1 is true display, now do conditional2, and so on

yes good 'ol PSEUDO

because currently how I plan to do it willl be have one conditional with all things i want in it, plus everything else, then another conditional for some thigns already in the other and so on, but that takes SOO much time, and is SOO un-efficiant. Theres gotta be someway we cna make it so it parses every conditional no matter what.


Edit: OK, now i was thinking that considering most code in the php files around everywhere, its along the lines of

If Blah
elseif blah
elseif blah

so really maybe it just should be

if blah;
if blah;
if blah;

then each conditional is parsed and used no matter what

little bit of editing needed so that all things appear in one box and not in 4 or 5 :P

Logician 09-29-2002 10:00 AM

Quote:

How can I find the usergroup IDs?
This will help..

Quote:

if conditional1 is true display, now do conditional2, and so on
Before trying to modify this hack I suggest you first checking Advanced Templates Hack. It has the same conditional power (now for vb templates) and its parsing is just like you want: It parse through the entire template and parse all met conditionals, does not return when found a first true conditional. So you can use it for your needs, say, by creating conditionals in your forumhome template and putting inside your announcement and its HTML code. All of them will be displayed if condition is true..

The General 09-29-2002 12:01 PM

Cheers mate!

VeryVERY cool hack, works like a charm on 2.2.8!

Wildthinks 10-09-2002 08:20 AM

[[($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]
Hi $bbuserinfo[usergroupid],
diese Nachricht k?nnen nur Moderatoren und Admins lesen. Bitte einen Thread im Mod-Board aufmachen oder in einem Antworten, ob Du das lesen kannst :umfall:
Gr??e Wildthinks
[[/($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]

The "Hi $bbuserinfo[usergroupid]," are on screen and not "Hi Wildthinks" :confused:

Logician 10-09-2002 04:55 PM

Quote:

Originally posted by Wildthinks
[[($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]
Hi $bbuserinfo[usergroupid],
diese Nachricht k?nnen nur Moderatoren und Admins lesen. Bitte einen Thread im Mod-Board aufmachen oder in einem Antworten, ob Du das lesen kannst :umfall:
Gr??e Wildthinks
[[/($bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]

The "Hi $bbuserinfo[usergroupid]," are on screen and not "Hi Wildthinks" :confused:

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

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

kira 10-09-2002 07:56 PM

Just wanted to thank you for another great and powerful hack, Logician. Every bit of personalization and customization helps, and as always you've added tremendously to my abilities to control my forum. Thanks!

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 01:16 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.01576 seconds
  • Memory Usage 1,858KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (19)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