View Full Version : Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals
Logician
09-04-2002, 10:00 PM
This hack allows you to post powerful dynamic announcements (changing according to different conditions) on forum home page. It differs from vbulletin's default announcements in 2 ways:
The announcement is displayed in forum home page (or other board pages), not inside thread view. So visitors will read them without clicking on them.
The Hack's announcements are not static: ie. they can be powerfully programmed to change themselves according to many conditions.
Basic Usage : You can set a text in your Admin CP and it's displayed in forum home to all users.
Advanced Usage : With conditionals you can set different texts/notifications/messages/announcements and they will be displayed if your pre-configured condition applies. This allows you to create powerful announcements/private messages/texts which address their receipt only if a certain condition is met. Some examples:
You can set to show an announcement in forum home IF:
user is X
user's usergroup is Y
his profile field Z is X
user has X posts or has more than Y posts but less than Z posts
his last visit time was X days ago
today is X, hour is between Y and Z, day is wednesday, month is Y, week is month's 2nd week, today is user's birthday
User is invisible/visible
user is using style A
his cookies are on
his timeset is set to A
etc..
The conditionals even allows you to design "Board Tips" ever changing according to user's seniority (https://vborg.vbsupport.ru/showthread.php?postid=295683#post295683) or post number (https://vborg.vbsupport.ru/showthread.php?postid=295682#post295682). See how-to document (https://vborg.vbsupport.ru/showthread.php?postid=295681#post295681) for conditional usage and more info..
It's tested in both v.2.2.6 and v.2.2.7 but it should work with any versions > 2.0.3. (v.2.2.8 or later Users READ HERE! (https://vborg.vbsupport.ru/showthread.php?postid=308753#post308753)) I'm using it in my own board and a friend's board for more than a month and found it quite stable and released it. Although not likely, if you found any bugs, holler and I'll fix it..
Here is a Screenshot (https://vborg.vbsupport.ru/showpost.php?s=&postid=295678) from a "general announcement".
Here is a Screenshot (https://vborg.vbsupport.ru/showpost.php?s=&postid=295679) of announcement which is addressed to a certain user.
Some Features:
It's Admin CP integrated (Screenshot (https://vborg.vbsupport.ru/showpost.php?s=&postid=295680))
Smiley and BBCode in announcements are parsed
You can address your users with their usernames inside announcements (Use $bbuserinfo[username] variable)
Announcements are displayed directly in Forum Home so users are forced to read them.
The Conditionals help you to design powerful and ever changing announcements/private messages/forum home notifications.
If you have problems displaying HTML/smilie/bbcode in your announcements, make this tiny change (https://vborg.vbsupport.ru/showpost.php?p=467469&postcount=203) in hack code
If you install the hack, click INSTALL (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=43194), thank you..
Logician \\=^))
Logician
09-05-2002, 02:50 PM
Screenshot1:
General announcement in forum home
Logician
09-05-2002, 02:51 PM
Screenshot2:
An announcement addressed to a specific user only. (Needless to say it will be visible only if the visitor is that user)
Logician
09-05-2002, 02:51 PM
Screenshot 3:
Admin CP/Settings: Where you customize your announcements
Logician
09-05-2002, 02:52 PM
How To Use - Conditionals Help
After you installed the hack:
Basic Usage:
If you want to display an announcement to ALL users, simply login to Admin CP/Choose VB Settings/Dynamic Forum Announcements and enter your announcement as a plain text into the box. (Delete the previous one). You can use smilies and all other bbcode in your announcements. This text will be dragged to your forum home regardless of whoever the page visitor is.
Advanced Usage:
You can use "conditionals" to set announcements displayed if a certain condition applies. If you are using my WebTemplates Hack (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36419) , you should be already familiar with the term "conditional". In Webtemplates conditionals could be used to put different texts/HTML codes which will be parsed if certain condition appied in your non-vb pages. It's the same concept and their usage is same. Here is its format:
[[(your conditional)]] Your Announcement [[/(your conditional)]]
Conditional Rules:
Conditionals are covered inside [[ ]] tags
Conditional itself is in paranthesis ( )
Announcements are written in between the conditional tags
Opening and closing conditional are exactly same except closing conditional has a / right before (
If you are trying to check if a X equals to Y use DOUBLE equation mark not single. eg. Correct: X==Y Incorrect:X=Y
You can design as many conditional as you like. If more than 1 condition applies at the same time, the conditional which is above (=higher priority) is parsed.
If you write a plain text without a conditional together with other conditionals, this text is considered "default announcement" and displayed if no conditions applies.
Some examples will help you understand the rules better. Here are some conditionals and the announcement texts which explains what that conditional do:
* [[($bbuserinfo[userid]==32)]] Show this announcement if page visitor's user id is 32 [[/($bbuserinfo[userid]==32)]]
* [[($bbuserinfo[usergroupid]==5)]] Show this announcement if page visitor's usergroupid is 5 (=if he is a Super Mod) [[/($bbuserinfo[usergroupid]==5)]]
* [[($bbuserinfo[usergroupid]==1)]] Show this announcement if page visitor is a guest [[/($bbuserinfo[usergroupid]==1)]]
* [[($bbuserinfo[userid]>1)]] Show this announcement if page visitor is NOT a guest [[/($bbuserinfo[userid]>1)]]
* [[($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]] Show this announcement if page visitor's a Super Mod OR a Mod OR an Admin [[/($bbuserinfo[usergroupid]==5 OR $bbuserinfo[usergroupid]==6 OR $bbuserinfo[usergroupid]==7)]]
* [[($bbuserinfo[posts]<10)]] Show this announcement if page visitor has less than 10 posts [[/($bbuserinfo[posts]<10)]]
* [[($bbuserinfo[lastvisit] and $bbuserinfo[lastvisit]<strtotime(-30 days))]]Show this announcement if page visitor has not visited your board for 30 days[[/($bbuserinfo[lastvisit] and $bbuserinfo[lastvisit]<strtotime(-30 days))]]
* [[($bbuserinfo[joindate]>strtotime("-2 weeks") AND $bbuserinfo[joindate]<strtotime("-4 weeks"))]]Show this announcement if page visitor registered in a date between 2 weeks to 4 weeks from now[[/($bbuserinfo[joindate]>strtotime("-2 weeks") AND $bbuserinfo[joindate]<strtotime("-4 weeks"))]]
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.
Notice About vbulletin admin CP/settings bug (http://www.vbulletin.com/forum/showthread.php?s=&threadid=54071): While I code this hack I have noticed that vbulletin Admin CP/Settings section has a bug. This hack's installation step 6 also fixes this bug so you wont be effected by it after the installation. You can find more info about this bug in the official vbulletin.com thread (http://www.vbulletin.com/forum/showthread.php?s=&threadid=54071).
Hope this document helps you to understand the term conditional. You can use this help page as a reference for this hack, for WebTemplates Hack (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36419) and for some of other hacks I am coding at the moment. I have recently noticed that vbulletin version 3 will also have a concept "vb conditionals". I dont know their syntax but their logic will be same so you can consider yourself lucky by using the conditionals before it's officially integrated to the script.
If you need more help to design a "conditional", before asking me please read this document carefully for a few times, try to form it by yourself and if they all fail, ask in the hack's thread giving details about exactly what conditional you tried to form and what text (format) have you tried (and failed). Thank you.
Logician
09-05-2002, 02:52 PM
Add-on 1: Forum Tips Depending on visitor's post count
If you copy/paste this text into your announcement box, you'll create a forum tips announcement which will be displayed to your visitors according to their post count.
Eg.
If his post number < 1 displays "Tip 1"
If his post number = 1 displays "Tip 2"
If his post number > 1 AND <=5 displays "Tip 3"
etc..
More info in the text file..
Logician
09-05-2002, 02:53 PM
Add-on 2: Forum Tips Depending on visitor's seniority
If you copy/paste this text into your announcement box, you'll create a forum tips announcement which will be displayed to your visitors according to their seniority (register date)
Eg.
If he registered today displays "Tip 1"
If he register day >1 AND <3 displays "Tip 2"
If he register day >=3 AND <5 displays "Tip 3"
etc..
More info in the text file..
MarkB
09-05-2002, 02:56 PM
:o Very interesting hack!! :o
KarateKid
09-05-2002, 03:14 PM
You're great Logican, you alway create very helpfull hacks!
Thank you very much! :)
Dean C
09-05-2002, 03:14 PM
this is AWESOME... one of the best hacks... im definately going to install this later 2nite :D
- Mist
assassingod
09-05-2002, 03:38 PM
Bloody brilliant:) Defintely going to install this one! Great work Logican
Floris
09-05-2002, 05:01 PM
Just like Mist says 'this is awesum!'
We are totally gonna try and see if we can use this.
g-force2k2
09-05-2002, 05:11 PM
awesome hack Logician :) reason why you're one of the best at vb.org ;) keep up the great work...
g-force2k2
One of the coolest hacks I have seen in a while.
Velocd
09-05-2002, 06:27 PM
Terrific hack Logician, as it will defiantly will prove useful for many ;)
*slaps install*
hypedave
09-05-2002, 06:48 PM
Dude this is jus what I was looking for, I see this as a good way to warnmembers, welcome visitor's even advertisement, or annouce to moderators board meetings, is is to cool, thanks and definetly keep up the good work
joeboo
09-05-2002, 09:33 PM
sexy sexy! i will definetly install this
Great hack! :)
Easy installation too, thanks a bunch:)
SemperFidelis
09-06-2002, 04:31 AM
Absoluetly brilliant hack
Very impressive
Thankyou very much
:D
NexDog
09-06-2002, 11:08 AM
Whoah, wtf? This is %$#*&@$& amazing dude!!!!!!!!!!!
/me can't wait to install
Floris
09-06-2002, 04:24 PM
Installed, everything went 100% ok :) I use it on my site (http://creations.nl/forum/index.php?s=&styleid=5)
as usual, great hack logician. congrats on your fine work.
floren.
LOD-squa
09-06-2002, 07:23 PM
I installed it good hack.
Intex
09-07-2002, 07:41 AM
V. Nice hack m8. Will check this out soon.
DrkFusion
09-07-2002, 01:23 PM
Nice work Locien, I just got a chance to get on the net after school started, and I see so many new hacks, great job :)
Alien
09-08-2002, 05:06 AM
Incredible idea, nice work on this indeed! :D
Logician
09-09-2002, 09:20 AM
To all thread repliers:
Thank you all for your kind comments. I hope you find its usage after installation as much easy as you liked the hack. The "conditionals" might be a little bit confusing especially for newbies, I'm aware of that. But it's really them that makes the hack powerful and highly customizable so all I could do was to supply a good how-to document about them.
If you liked this hack you might want a check these hacks which uses the same conditional power:
Advanced Templates: (https://vborg.vbsupport.ru/showthread.php?s=&threadid=43325) To design dynamic vb templates with conditionals
WebTemplates: (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36419) To design non-vb pages which compile data from your vb inside Vb Admin CP(and it has conditional support too)
I really love the power of conditionals so wait for some more hacks from me which is centered around this concept.. :)
Bad Bunny
09-10-2002, 04:53 AM
Firstly, this sounds very cool and fun to expiriment with making new conditionals.
Question: How many queries does this add?
Logician
09-10-2002, 07:18 AM
Originally posted by Bad Bunny
Question: How many queries does this add?
Let me give you a "good answer" for your "good question": Surprisingly none. :)
It does not increase your query load because it does not make any SQL connection to your server (as you might have noticed from the hack code). I can hear the question: "Then how does it grab the announcements?" The answer is they are loaded together with your vb settings (that is why I integrated the Admin CP mod. to vb settings screen). And since the settings are already pulled from the db, we dont need to make an extra query for announcements..
Buddha
09-11-2002, 09:42 PM
this is fan-damn-tastic logician.
i've already got a few of your hacks installed.
thank you very much.
Willard Reece
09-11-2002, 10:16 PM
I just tried to install and got this error.
Warning: Failed opening './global.php' for inclusion (include_path='') in /home/reecefam/public_html/DFHA_install.php on line 3
What did I do wrong.
here is where I am trying to run from
reecefamilies.com/vp/DFHA_install.php
Thanks
Willard
Reecefamilies (http://www.reecefamilies.com/vp/)
Logician
09-12-2002, 05:44 AM
Originally posted by Willard Reece
[B]I just tried to install and got this error.
Warning: Failed opening './global.php' for inclusion (include_path='') in /home/reecefam/public_html/DFHA_install.php on line 3
You have to upload (and run) the installation file from your FORUM directory (where global.php resides). It seems that you uploaded the file to a wrong directory.
I checked your site and for you correct dir is:
http://www.reecefamilies.com/vp/forums/
Upload and run (once!) the file from there and you'll be fine..
Xenon
09-12-2002, 09:11 AM
As i thought, i'm away for two week and Pal Logician writes a terrific hack.
Very good work pal, and not increasing the querie amount
:thumbsup:
i'm sure i'll install it :)
Willard Reece
09-12-2002, 08:13 PM
Logician
Thank you so much..
It worked like a dream,
This is the second hack I have done by myself,
first hack was games hack and now this one. So i'm learning
The first addition I added to my board was vbportal.
I had to have alot of help on the...vbportal add on.
MalaK_3araby
09-12-2002, 10:15 PM
sounds just Great.
will try it soon.
Thanks logician ..
Willard Reece
09-12-2002, 10:41 PM
Just another word
Man this is nice!!!!!!!!!!!!!!!!!!!!!!!
Reecefamilies (www.reecefamilies.com)
Logician
09-13-2002, 07:31 PM
Originally posted by Willard Reece
Just another word
Man this is nice!!!!!!!!!!!!!!!!!!!!!!!
Seems your visitors liked it too.. :)
A few tips for your board:
a) You can use bbcode in your announcement so you can link the relevant thread inside your announcement with url tag
b) Your poll is open to site members only so you can limit your announcement for only their view too. Just add:
[[($bbuserinfo[userid]>0)]] in the begining and [[/($bbuserinfo[userid]>0)]] in the end of your announcement which will restrict this announcement for only your members' view and guest will not see it..
Enjoy..
Willard Reece
09-16-2002, 06:36 PM
I'm trying to uninstall this hack to see if it is my problem.
I got it installed and now 2 days later with out doing anything else to the site, my wifes pc and my neice's pc don't log on. and I ask someome else and they said the same.
It takes there name and p/w and comes back to a blank 404 error page.
Anyone have this problem yet??
Thanks
Wilard
Reecefamilies (http://reecefamilies.com)
Logician
09-16-2002, 07:00 PM
Originally posted by Willard Reece
I'm trying to uninstall this hack to see if it is my problem.
I got it installed and now 2 days later with out doing anything else to the site, my wifes pc and my neice's pc don't log on. and I ask someome else and they said the same.
It takes there name and p/w and comes back to a blank 404 error page.
Anyone have this problem yet??
Thanks
Wilard
Reecefamilies (http://reecefamilies.com)
It does not sound like your problem is related to this hack. But to make sure try these steps:
1- Delete your announcement box and try again. It can be a invalid conditional you set can be the cause.
2- Delete the part 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.
The hack has been used in many boards for sometime now (including mine) and I havent noticed any bugs (especially something weird like that). And the problem you refer does not seem related to a section this hacks changes. But let me know anyway..
BTW.:
1- Does it your wife's PC not logging on or her account. That is, can she log in from another computer?
2- Do other people logon without problems?
3- What's the URL they get after unsuccessful login attemps.
It sounds like it's related to member.php so I suggest checking this file too, especially if you applied any hacks there..
Willard Reece
09-16-2002, 07:12 PM
If I go to another pc , I can't even log on as myself.
4 pc's and can't log on,,maybe more havn't heard from anyone yet,
My main pc here is logging on because I have it save in cookies.
I hope thats why.
url comes up this
http://www.reecefamilies.com/member.php
and error 404 page.
After trying to log on.
and can't log on with her name or my neice's account.
Logician
09-16-2002, 07:25 PM
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.
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
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 ?
[[($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
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?
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
$postinfo = getpostinfo($postid);
Logician
09-20-2002, 07:15 AM
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
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
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
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
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
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.
Is there any way I could add this into my "header" template? does seem to work..
Logician
09-25-2002, 08:09 AM
Originally posted by LawnDawg
Is there any way I could add this into my "header" template? does seem to work..
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
How can I find the usergroup IDs?
This (https://vborg.vbsupport.ru/showthread.php?s=&threadid=39142) will help..
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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=43325). 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
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]" ;)
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
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
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
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
Originally posted by digitalJE5U5
How can I make the box where you edit the code LARGER?
yeah good idea: :)
Edit admin/options.php find:
} elseif ($setting[optioncode]=="textarea") {
BEFORE that add:
// 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 (https://vborg.vbsupport.ru/showthread.php?postid=295681#post295681) , 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:
// 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
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
TheSaint-AeD
10-17-2002, 07:58 AM
Awesome Hack!
Would it be possible to add some comfort to it? ;) New Option in ACP (I don't care about the 1 query) and some usefull buttons to easier configure the conditionals, similiar to bbcode in posts, like a drop down menu where you can choose the usergroup it is shown to, Integration of BBCode-Buttons etc...
Guess this is a lot work, isn't it? ;) I would very appreciate if you could take the time.
Logician
10-17-2002, 12:10 PM
Originally posted by TheSaint-AeD
Guess this is a lot work, isn't it? ;) I would very appreciate if you could take the time.
yes that's a lot of work and would take time which I dont have at the moment.. ;)
Actually I use "conditonals" in many of my hacks and I know that although they are powerful, they are not "newbie-friendly". Therefore I always thought a kind of visual mask for conditionals which would help ordinary users to form them more easily. But there is no easy way to code such an integration. For example you told about choosing "usergroups" from a pull down option which is a good idea but a conditional does not necessarily include a usergroup. It can involve ALL vb user related variables like userid, register date, style id etc, and also ALL the other VB variables like forumid, threadid, post id (that's for my other hacks using conditionals). Besides they can coexist together: For example someone might want to create a conditional which will apply if user group is 6 AND user is viewing thread 17 AND today is his birthday. :) Well I still couldnt find a way to create a visual mask that will help you forming this conditional. I have to trust the fact that most of the users using hacks with conditionals are "power users" who would need little help to form them.. ;)
kreatiV
10-27-2002, 08:25 AM
Most fantastic this hack! Very easy to install and works as promised in 2.2.8 with the changed step 4.
kreatiV
10-27-2002, 09:12 AM
Is there a way to have a general Personal Conditional?
Something like,
Welcome, [NICKNAME] to the board. Please make sure that you read the Info & News Forum.
So instead of [NICKNAME] it shows the users name?
Logician
10-27-2002, 09:38 AM
Welcome, $bbuserinfo[username] to the board. Please make sure that you read the Info & News Forum.
is there a way to make it have a fader? like its a news fader.
i saw a hack on a board once, i dont know the name of the hack, but i was wondering if this could do the same thing?
it fades from one paragraph to the other, like a javascript fader? could this hack do that also with somw extra modifications?
btw, awesome hack! i installed it with no problems.
thanks.
Logician
10-31-2002, 09:08 AM
Originally posted by cono
is there a way to make it have a fader? like its a news fader.
i saw a hack on a board once, i dont know the name of the hack, but i was wondering if this could do the same thing?
it fades from one paragraph to the other, like a javascript fader? could this hack do that also with somw extra modifications?
If a javascript is doing the fade, it may be applied to this hack. I dont know how that script works but say if it has a main function and a tag like
your text goes here
all you have to do is put the tag [fade] in your announcement box and the main function inside your forumhome template..
Of course if the script works differently, different solutions may apply..
RayMatrix
11-01-2002, 06:29 PM
. . .that warns a user when the PN-Counter ($allpm[messages]) is higher than 'x' PN's.
I tried this code:
[[($bbuserinfo[allpm]>=40)]]
Hallo $bbuserinfo[username],
In Deinen PN Postf?chern liegen zur Zeit $allpm[messages] gesammelte Nachrichten.
Noch $rest und Du kannst keine mehr empfangen !!
Bitte ?berpr?fe Dein Postfach und l?sche nicht mehr ben?tigte Nachrichten.
Danke und Gru?
RayMatrix[[/($bbuserinfo[allpm]>=40)]]
And also this one:
[[($allpm[messages]>=40)]]
Hallo $bbuserinfo[username],
In Deinen PN Postf?chern liegen zur Zeit $allpm[messages] gesammelte Nachrichten.
Noch $rest und Du kannst keine mehr empfangen !!
Bitte ?berpr?fe Dein Postfach und l?sche nicht mehr ben?tigte Nachrichten.
Danke und Gru?
RayMatrix[[/($allpm[messages]>=40)]]
Both wont work for me.
My Question is:
Is $bbuserinfo only looking for fields wich are in DB Folder 'user' ?
If no, what do i have to change to read from all the other folders in the DB ?
Thanks for your help
Regards
Logician
11-02-2002, 10:34 AM
Originally posted by RayMatrix
. . .that warns a user when the PN-Counter ($allpm[messages]) is higher than 'x' PN's.
Actually this works:
[[($allpm[messages]>=40)]]
Hallo $bbuserinfo[username],
In Deinen PN Postf?chern liegen zur Zeit $allpm[messages] gesammelte Nachrichten.
Noch $rest und Du kannst keine mehr empfangen !!
Bitte ?berpr?fe Dein Postfach und l?sche nicht mehr ben?tigte Nachrichten.
Danke und Gru?
RayMatrix[[/($allpm[messages]>=40)]]
But you need to apply the hack to your index.php (not global.php) so that it will work. Because variable $allpm[messages] is assigned a value in index.php and global.php runs before index.php runs. Therefore it is blank if you apply the code in global.php.
The answer to your question is: This hack is competible with ALL vb variables available provided that they are assigned a value before dynamic announcement code is run..
RayMatrix
11-02-2002, 01:42 PM
. . .but your explanation is to hard for me to understand.
Original posted by Logician
But you need to apply the hack to your index.php (not global.php) so that it will workWich hack do you meen here ?
If you meen your code:// Logician Dynamic Forum Announcements Hack
$dynamic_fha=strchr($optionstemp['template'],'$dynamic_fha = "');
eval($dynamic_fha);
$dfh_announcement=dynamic_a($dynamic_fha);
// Logician Dynamic Forum Announcements Hackthen its ok, i added it to index.php, cause your installinstruction tells to do at step 4.
And another Question:
Is there any place where i can read about the Variables so i can understand where '$bbuserinfo' comes from ? And is it right that your Code only get called in index.php when i insert the code as step 4 tells to do ?
Thanks for all
Regards
Logician
11-02-2002, 02:04 PM
Originally posted by RayMatrix
. . .but your explanation is to hard for me to understand.
ok let me clarify:
find the hack code in index.php (the one you referred above) and cut (delete) it.
Now go at the end of index.php, find:
eval("dooutput(\"".gettemplate('forumhome')."\");");
Before that paste (insert) the hack code, then you'll be fine..
Is there any place where i can read about the Variables so i can understand where '$bbuserinfo' comes from ?
$bbuserinfo variable saves the info of the page visitor according to the "user" and "userfield" tables. Field names in these tables are also references in this variable. So for example the "usergroupid" field in user table is $bbuserinfo[usergroupid]. Check the fields in these 2 tables and you'll see what this variable keeps.
And is it right that your Code only get called in index.php when i insert the code as step 4 tells to do ?
What I meant was that: Check where the hack code resides and where your variable $allpm[messages] gets a value. The hack code is parsed BEFORE $allpm[messages] is assigned a value so it couldnt work in your announcement.
If you heed to my advice and change the code's location, the hack would parse the $allpm[messages] variable because it would already have a value BEFORE hack runs..
See?
RayMatrix
11-02-2002, 03:38 PM
. . .and i think the creator also ;)
THX for your help, great Hack. . .i love it more from minute to minute !
Keep on your good work !!
Regards
LOD-squa
11-04-2002, 06:26 PM
I have a question can you do this outside the announcement?
Logician
11-04-2002, 06:40 PM
Originally posted by gohanssj2
I have a question can you do this outside the announcement?
Do what? If you mean "using conditionals", I have some other hacks using them:
For non-vb web pages check webtemplates hack
For vb templates check dynamic templates hack
LOD-squa
11-04-2002, 07:20 PM
Originally posted by Logician
Do what? If you mean "using conditionals", I have some other hacks using them:
For non-vb web pages check webtemplates hack
For vb templates check dynamic templates hack
Could you link me to dynamic templates?
Logician
11-04-2002, 07:36 PM
Originally posted by gohanssj2
Could you link me to dynamic templates?
Advanced Templates: Dynamic Templates Changing according to different conditions (https://vborg.vbsupport.ru/showthread.php?s=&threadid=43325)
LOD-squa
11-04-2002, 07:41 PM
Okay Thanks for your help man.
Bison
11-05-2002, 02:21 AM
This is one friggin *cool* hack ... this should be implemented into vB 3.0 in a major way!
SIX STARS !!! :banana:
Cyberhouse
11-07-2002, 06:13 AM
Originally posted by Rolodex
This is one friggin *cool* hack
Agree :D
Obi-Wan
11-20-2002, 04:23 PM
Very very kewl hack.
Me tries to install :)
Banana
11-20-2002, 08:08 PM
Just installed it and everything works fine.....except I can't embed bbcode (e.g. , ) in the announcement. I have no conditionals....so just an announcement everyone can see. Ideas?
Logician
11-20-2002, 10:53 PM
Originally posted by Banana
Just installed it and everything works fine.....except I can't embed bbcode (e.g. , ) in the announcement. I have no conditionals....so just an announcement everyone can see. Ideas?
Did you read here (http://205.214.66.221/forum/showthread.php?postid=308753#post308753)?
Banana
11-21-2002, 08:01 AM
Yes, but which post? Maybe best if you quote a little bit of it....i'll manage then! ta
Logician
11-21-2002, 08:10 AM
Originally posted by Banana
Yes, but which post? Maybe best if you quote a little bit of it....i'll manage then! ta
My link was supposed to take directly to the post itself (you need to wait the page loaded completely). It's postid 78 in this thread with a big red title:
IMPORTANT NOTICE FOR V.2.2.8 (OR LATER) USERS:
Banana
11-21-2002, 01:47 PM
Yes, the contents of that post are in the installation instructions and applied correctly.
Banana
11-22-2002, 09:59 AM
Incidentally, I don't get the symptoms as described in that post. The CONDITIONALS appear to work fine. It's the vbCode that don't (e.g. "[b]").
Other than that - fantastic hack!
Logician
11-22-2002, 01:39 PM
Originally posted by Banana
Incidentally, I don't get the symptoms as described in that post. The CONDITIONALS appear to work fine. It's the vbCode that don't (e.g. "[b]").
1- What exactly happens when you use them? (Any screenshots?)
2- Can you use $bbuserinfo[username]?
3- Can you use smilies?
4- What's your vb version?
5- Can you use other vb code like quote or php or font
6- Do URL converted well?
7- Is there any chance that you modified default vb code for bold or italic in Admin CP/BB Code section?
Banana
11-22-2002, 01:47 PM
Originally posted by Logician
1- What exactly happens when you use them? (Any screenshots?)
2- Can you use $bbuserinfo[username]?
3- Can you use smilies?
4- What's your vb version?
5- Can you use other vb code like quote or php or font
6- Do URL converted well?
7- Is there any chance that you modified default vb code for bold or italic in Admin CP/BB Code section?
1. Text reads: "A test announcement [ b]bold [ b] Here's a smile : )" in announcement admin box and on the actual announcement shown to user(s). (n.b. I've added spaces in THIS post between bb codes - otherwise they work here :( )
2. No
3. No.
4. 2.2.8 (Yes I have installed the patch for 2.2.8 as described above)
5. No
6. Not sure what you mean
7. No - they work fine in actual postings.
Logician
11-22-2002, 10:04 PM
Originally posted by Banana
Incidentally, I don't get the symptoms as described in that post. The CONDITIONALS appear to work fine. It's the vbCode that don't (e.g. "[b]").
weird.. I installed a test 228 board from the ground and applied the hack to test the bug you mentioned, but hack works fine in the 228 board as you can see in the screenshot. :rolleyes:
Only thing I can think of is the existance of another hack in your board which clashes with this one in the function.php. To test it, try this:
In hack code find,
$matches14[2]=bbcodeparse($matches14[2]);
And replace as:
$matches14[2]=bbcodeparse2($matches14[2],1,1,1,1);
and find:
$matches14[2]=bbcodeparse(trim($matches14[2]));
Replace as
$matches14[2]=bbcodeparse2(trim($matches14[2]),1,1,1,1);
Banana
11-22-2002, 11:42 PM
No dice. This is how the bottom of functions.php looks post the above eidt being applied.......
// Logician Dynamic Forum Announcements Hack
function dynamic_a($logician_dfa_incoming1)
{
extract ($GLOBALS);
while (preg_match("/\[\[(.*)\]\](.*)\[\[(\/\\1)\]\]/siU",$logician_dfa_incoming1,$matches14))
{
/*
echo "<br> conditional parse- 1=".$matches14[1];
echo '$matches14[0]'.$matches14[0].'<br><br>';// => Whole text
echo '$matches14[1]'.$matches14[1].'<br><br>';// => conditional itself
echo '$matches14[2]'.$matches14[2].'<br><br>';// => Text between conditional
echo '$matches14[3]'.$matches14[3].'<br><br>';// => conditional close tag (with closing /)
*/
@eval ('if ('.stripslashes($matches14[1]).') { $eval_deger= "1"; } else { $eval_deger= "0"; }');
if ($eval_deger==1) //if conditional applied
{
//$logician_dfa_incoming1=preg_replace("/\[\[(.*)\]\](.*)\[\[(\/\\1)\]\]/siU", "\\2", $logician_dfa_incoming1);
//echo "conditional $matches14[1] applied!<br>" ;
$matches14[2]=bbcodeparse(trim($matches14[2]),1,1,1,1);
eval("\$dfh_announcement1 = \"".gettemplate("dfh_announcement")."\";");
return $dfh_announcement1;
}
else //conditional not applied so let's delete it so that it wont be matched in preg_match again..
{$logician_dfa_incoming1=str_replace($matches14[0], '', $logician_dfa_incoming1);}
}
//echo "no conditional found or applies<br>";
$matches14[2]=trim($logician_dfa_incoming1);
if (trim($matches14[2])) {$matches14[2]=bbcodeparse($matches14[2],1,1,1,1);eval("\$dfh_announcement1 = \"".gettemplate("dfh_announcement")."\";");}
return $dfh_announcement1;
}
// Logician Dynamic Forum Announcements Hack
?>
There's no other hacks in the file.
I changed announcement text and saved it too.
Banana
11-23-2002, 08:14 AM
This is unrelated and a small suggestion. Rather than have the admin function tucked away at the end of a very long page. Why not have it linked directly off its own control panel navigation link in the left hand column?
Logician
11-23-2002, 09:40 AM
Originally posted by Banana
This is unrelated and a small suggestion. Rather than have the admin function tucked away at the end of a very long page. Why not have it linked directly off its own control panel navigation link in the left hand column?
it would require a little bit more hacking and an additinal 1 query in your main page so this is why I integrated into vb settings section (detailed info is somewhere in the thread). But if you find the announcement edit column small, you can enlarge it. I gave the hack for it in the thread.
BTW. can u still not see bbcode after you applied the change I gave you above?
Banana
11-23-2002, 09:43 AM
Originally posted by Logician
BTW. can u still not see bbcode after you applied the change I gave you above? Correct - Still doesn't work - that's what post #110 says.
Thanks for the rest of your post above BTW.
Banana
11-26-2002, 02:49 PM
Logician, if I change "bbcodeparse" to "bbcodeparse2" in the code section I posted about 5 messages up I get the bold, and quote and smilies working BUT i still get "$bbuserinfo[username]" (without the surrounding quotes) appearing in the announcements.
KarateKid
11-30-2002, 04:12 PM
Hi,
does it work with 2.2.9 ?
Regards.
Logician
11-30-2002, 04:33 PM
Originally posted by KarateKid
does it work with 2.2.9 ?
I didnt test myself but I believe it should work provided that you apply the 2.2.8 modification in the installation. I appreciate if someone who tested confirms this.
KarateKid
11-30-2002, 05:48 PM
okay, thanks.
I'll try it :)
freeshares1
12-22-2002, 07:05 PM
Thanks, This is fanatasic......
Shpookdefied
01-13-2003, 06:14 AM
Well, I just tried installing on 2.2.9, and have absolutley nothing to show for it. The options arent coming up in AdminCP. I'm a bit confused, and pretty new to this, so any help would be much appreciated. But still, it's a very nice hack.
Logician
01-13-2003, 08:08 AM
Originally posted by Shpookdefied
Well, I just tried installing on 2.2.9, and have absolutley nothing to show for it. The options arent coming up in AdminCP. I'm a bit confused, and pretty new to this, so any help would be much appreciated. But still, it's a very nice hack.
sounds like a template problem. Make sure you made the template modifications/additions correctly (check template name, it's caps etc. too) and if you have more than 1 template sets, apply the modifications in all sets..
Also make sure you clicked "APPLY" in vb settings section after you installed the hack
Shpookdefied
01-14-2003, 03:02 AM
Ok, I haven't installed it in all the template sets. :D I'm gonna go do that now, and I'll let you know how it works. Much respect for the amount of support you've given though.
Another AWESOME hack from Logician. :D ;)
Thanks,
w596
Logikos
01-17-2003, 01:42 AM
Ok i have installed this hack EXACTLY as instructed.
and im getting this error when trying to load my site
Parse error: parse error in /home/hazelboy/public_html/Forums/admin/functions.php on line 855
Fatal error: Call to undefined function: vbdate() in /home/hazelboy/public_html/Forums/admin/sessions.php on line 400
Note: I have installed this on every style.
Any help is greatly appreciated, as this would be a GREAT hack to install.
-Nem
Logician
01-17-2003, 10:54 AM
Originally posted by []\[]emesis
Ok i have installed this hack EXACTLY as instructed.
and im getting this error when trying to load my site
Your problem is related to STEP 2. Check very carefully, you applied it correctly.
BTW. before ?> add: means "add one line above ?>", not append.
So after installation if your last line of functions.php became like this:
// Logician Dynamic Forum Announcements Hack ?>
This is wrong. It should be like this:
// Logician Dynamic Forum Announcements Hack
?>
More info can be found here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=39142)
Hope this helps..
Shpookdefied
01-18-2003, 06:11 AM
lol Me and Nemesis got it working, Logician. We just installed all the hacks on our PC vbulletin, then uploaded the .php files. Works great, and I love this hack. Thanks!
Buddha
01-30-2003, 03:18 PM
logician, i've got a quick question for you. i installed your hack sometime ago, and i love it. i would have loved a nav link instead as well, instead of digging for it in the options, but i did make it bigger, and i'm trying to add a nav link under the announcements that will go to the options page, and i'd like it to go to that section (like an anchored link). it's not working though... keeping in mind that i'm not a coder.
makenavoption("Dynamic Announcements","options.php?#settinggroup42");
i tried adding the session hash to that statement, but it still won't jump to that section of the page, it just goes to the top of the page.
any thoughts?
also, will it interfere with the hack if i add comments to add names in between the statements, so i know who they pertain to?
thanks.
Logician
01-31-2003, 08:53 AM
i'm trying to add a nav link under the announcements that will go to the options page, and i'd like it to go to that section
Try adding this:
$options .= "<a href=\"options.php?t=0&s=$session[sessionhash]#settinggroup34\">Dynamic Announcements</a><br>"; ;)
will it interfere with the hack if i add comments to add names in between the statements
Yep it will..
Buddha
01-31-2003, 05:21 PM
hey, thanks a lot... works like a charm... makes it a lot easier to pop to that section and make constant announcements.
thank you.
Bison
02-02-2003, 06:31 PM
Thsi is one of the finest hacks available! ;)
SpeedStreet
02-11-2003, 07:44 PM
Logician,
GREAT Hack! Only problem I am having, is that if I try entering in HTML code, it will not parse it. I only see my code on the page.
Is there a workaround for this?
Logician
02-12-2003, 06:56 PM
Originally posted by SpeedStreet
GREAT Hack! Only problem I am having, is that if I try entering in HTML code, it will not parse it. I only see my code on the page.
This should work:
In the hack code, find:
$matches14[2]=bbcodeparse($matches14[2]);
Replace it as:
$matches14[2]=bbcodeparse2($matches14[2],1,1,1,1);
Enjoy..
Boofo
02-24-2003, 02:42 AM
Sinan, if we choose to put the code in the global.php, do we need to use the code for 2,2,8 and above like we did in the index.php (before it was removed) or the code you have in that section (which is the code for 2.2.7 and below)? I am running 2.2.9.
And is it ok to use this AND the Dynamic templates hack together, ir is it redundant to do that? I have them both installed now. ;)
Boofo
02-24-2003, 03:19 AM
Originally posted by Buddha
hey, thanks a lot... works like a charm... makes it a lot easier to pop to that section and make constant announcements.
thank you.
Where did you add that at and how does the line of code look for that?
Also, you said you made it bigger. How? :)
mehungie2
02-24-2003, 05:31 AM
is there a way to have these just show up on individual forums to all users?
Logician
02-24-2003, 07:46 AM
Originally posted by Boofo
Sinan, if we choose to put the code in the global.php, do we need to use the code for 2,2,8 and above like we did in the index.php (before it was removed) or the code you have in that section (which is the code for 2.2.7 and below)? I am running 2.2.9.
good point.. Yes you have to use the code for 2.2.8 above if you are using vb 2.2.8 or later..
And is it ok to use this AND the Dynamic templates hack together, ir is it redundant to do that? I have them both installed now. ;)
they can work together, I have them both installed too... :)
Boofo
02-24-2003, 07:51 AM
Thank you, sir. I use the Dynamic templates hack for EVERYTHING now. I'm looking forward to making good use of the one, too. ;)
By the way, is there a way to be able to use the announcements on any page AND the index.php? I know we have to put it in one or the other, but it would be great to be able to use them both places. Do you know what I mean?
One last thing...is there a way to make a link in the left panel that will take you to the bottom of the vbulletin options where the announcement box is straight from that link?
Logician
02-24-2003, 07:59 AM
Originally posted by Boofo
Where did you add that at and how does the line of code look for that?
right under:
makenavoption("vBulletin Options","options.php?t=0","<br>");
in admin/index.php and don't forget to edit "#settinggroup34" part..
As for making it bigger, check the thread's old posts plz.. I gave the code somewhere in the thread, I can't remember where :)
Logician
02-24-2003, 08:04 AM
uh you are replying me faster than I'm replying you lol
Originally posted by Boofo
Thank you, sir. I use the Dynamic templates hack for EVERYTHING now. I'm looking forward to making good use of the one, too. ;)
yeah I like the hack much too.. :)
By the way, is there a way to be able to use the announcements on any page AND the index.php? I know we have to put it in one or the other, but it would be great to be able to use them both places. Do you know what I mean?
adding the code in global.php should let you use in main page too. In other words adding there means using in any vb page..
One last thing...is there a way to make a link in the left panel that will take you to the bottom of the vbulletin options where the announcement box is straight from that link?
replied above.. :)
Boofo
02-24-2003, 08:09 AM
Originally posted by Logician
uh you are replying me faster than I'm replying you lol
Great minds think alike. LOL
adding the code in global.php should let you use in main page too. In other words adding there means using in any vb page..
Ok, but you said the global is called before the index.php. I was referring to the $allpm example you gave above. I would like to be able to do that sort of thing on the index page and still be able to use it elsewhere in the forum. ;)
And I tried adding that code under the vb options link on the left but it takes me to the top of the vb options listing instead of to bottom of it. And idea how to make it go to the bottom? I did the settinggroup ID but it didn't change it. :)
Logician
02-24-2003, 08:32 AM
Originally posted by mehungie2
is there a way to have these just show up on individual forums to all users?
You can use this hack (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36153) for this
Logician
02-24-2003, 09:22 AM
Originally posted by Boofo
Ok, but you said the global is called before the index.php. I was referring to the $allpm example you gave above. I would like to be able to do that sort of thing on the index page and still be able to use it elsewhere in the forum. ;)
when you add the code into global.php, the dynamic announcement variable is formed for all vb files that runs (including index.php). Therefore you can use it nearly all vb templates. However if a template is called inside a function (eg. postbit template), then the variable should be declared global or will be blank since functions in PHP does not have global variable scope..
And I tried adding that code under the vb options link on the left but it takes me to the top of the vb options listing instead of to bottom of it. And idea how to make it go to the bottom? I did the settinggroup ID but it didn't change it. :)
make sure settinggroupid is belongs to dynamic announcement hack's id and is correct..
Boofo
02-24-2003, 09:31 AM
Originally posted by Logician
when you add the code into global.php, the dynamic announcement variable is formed for all vb files that runs (including index.php). Therefore you can use it nearly all vb templates. However if a template is called inside a function (eg. postbit template), then the variable should be declared global or will be blank since functions in PHP does not have global variable scope..
This is the message I was referring to.
https://vborg.vbsupport.ru/showthread.php?postid=317738#post317738
make sure settinggroupid is belongs to dynamic announcement hack's id and is correct..
I did that. The settinggroupid is 101 for it in my admin cp and it still stays at the top of the vb options page.
Logician
02-24-2003, 10:10 AM
Originally posted by Boofo
This is the message I was referring to.
https://vborg.vbsupport.ru/showthread.php?postid=317738#post317738
I see.. the reason we applied the hack to index.php in that post is because the variable ($allpm) used in the announcement is being assigned a value in index.php. So if you use this announcement in another template which is called in an other .php file but index.php $allpm variable will have no value, thus conditional will prove always FALSE.. To make it run in other templates, you have to hack the .php file where that template is called and assign a value for $allpm variable..
Bad Bunny
02-24-2003, 03:13 PM
Hmmm, I finally remembered this hack. Sheesh
Anyway, I have your dynamic templates hack installed, and that works wonderfully, but now I tried toi install this, and it does not seem to be doing anything.
Would the fact that I renamed my index file to forums have anything to do with this? I applied the changes that were for index to my newly named index. If you follow what I mean.
I receive no errors, nothing.
It seems that I could do a similar thing with just modifying the forumhome template using your other hack. So...should I just use one and not both?
Summary:
I have renamed my index, and applied the hack to it. Shouwld this affect the hack adversly?
Are your dynamic announcments and dynamic templates hacks compatible?
Boofo
02-24-2003, 07:51 PM
Originally posted by Logician
I see.. the reason we applied the hack to index.php in that post is because the variable ($allpm) used in the announcement is being assigned a value in index.php. So if you use this announcement in another template which is called in an other .php file but index.php $allpm variable will have no value, thus conditional will prove always FALSE.. To make it run in other templates, you have to hack the .php file where that template is called and assign a value for $allpm variable..
Ok, I see. Then we either use it one place or the other. I supposed I can use the dynamic templates for the other areas of the site that I can't reach with this if I put it in the index.php. ;)
Logician
02-24-2003, 08:02 PM
Originally posted by Bad Bunny
I have renamed my index, and applied the hack to it. Shouwld this affect the hack adversly?
Are your dynamic announcments and dynamic templates hacks compatible?
No, your changing the file name wouldnt effect the hack and yes both hacks should work ok together.
Please check :
1- If you have more than 1 template sets, have you created D.Announcement hack template in all sets.
2- Have you clicked SAVE SETTINGS in vb options after installation.
3- If you have a conditional, does it apply when you check it? Or simply remove the conditional and see if it works
Bad Bunny
02-25-2003, 03:03 AM
Well, minus the running of the script, I will retry the whole installation.
I know how to apply hacks, and I know you do a great job on hacks, so it must have been somewhere that I messed up in applying it.
I do have a couple styles, but they are forum dependant and not user-selectable.
Boofo
02-25-2003, 07:09 PM
I just tried to use the <normalfont> tags in the announcement and it still shows smallfont and the tags themselves. I tried the fix from page nine of this thread and it didn't make any difference. Am I doing something wrong somewhere?
Logician
02-25-2003, 07:22 PM
you need to edit that part in the hack's template:
<smallfont>$matches14[2]</smallfont>
Boofo
02-25-2003, 07:27 PM
Ahhh, ok. I supposed I should have looked there before I bothered you with this. Sorry about that. :confused:
But there's no way to be able to do it in the announcement itself? That would make it easier if you want to change the size of text on the fly. ;)
Logician
02-25-2003, 07:32 PM
Originally posted by Boofo
But there's no way to be able to do it in the announcement itself? That would make it easier if you want to change the size of text on the fly. ;)
Not tested but I guess you can apply bbcodeparse2 to the hack code. Like this:
Replace: (2 instances!)
$matches14[2]=bbcodeparse(trim($matches14[2]));
with
$matches14[2]=bbcodeparse2(trim($matches14[2]),1,1,1,1)
Boofo
02-25-2003, 07:51 PM
Worked like a charm. Thank you, Sinan! ;)
One last question...all bbcode or html code HAS to be in between the tags, right? You can't do it before and after the tags.
Like this:
[[($bbuserinfo[usergroupid]==6)]]<normalfont>
and not like this:
<normalfont>[[($bbuserinfo[usergroupid]==6)]]
Logician
02-25-2003, 08:01 PM
that's right because the announcement is only the part in-between conditionals. Rest including the conditionals are cut when it is parsed
Boofo
02-25-2003, 08:07 PM
Thank you for confirming that for me. Another fantastic hack by the "Great One!" I'm definitely going to have to make a trip back over there one of these days to meet the Master. ;)
Logician
02-25-2003, 08:30 PM
thank you for the undue kind words.. :)
Bad Bunny
02-26-2003, 06:08 AM
It was a stupid mistake on my poart.
As usual, your hack is awsome. Not that I ever doubted you. heh (Would not have installed it otherwise)
Thanks for all your hard work.
Triade
03-07-2003, 07:14 AM
I didn't installed this hack, but i have a question:
How many time the message stay in the user's screen?
I explain: the user see the message, but when it disappear?
There's a time for it or it rest in the page all the time?
Logician
03-07-2003, 01:17 PM
Originally posted by Triade
I didn't installed this hack, but i have a question:
How many time the message stay in the user's screen?
I explain: the user see the message, but when it disappear?
There's a time for it or it rest in the page all the time?
The announcement is a part of the page (HTML code), not a popup, so it stays there when user loads the main page.
If you want it not displayed anymore, you need to delete/modify it from your Admin CP..
Logician
03-22-2003, 12:39 PM
Here is a April Fools Day announcement for people who is using this hack: :rambo:
Enter this announcement in your dynamic announcement box:
[[($bbuserinfo[userid]>0 AND date("m-d")=="04-01")]]
[ SIZE=4][ COLOR=red]Our member [ b]$bbuserinfo[username][ /b] has been caught while trying to hack into our site server and we are instituting legal proceedings ASAP. In the mean time please do not contact $bbuserinfo[username], nor reply his posts/pms. Please [ url="http://yoururl/forum/showthread.php?s=&threadid=x"]get more info here now![/ url][ /COLOR][ /SIZE]
[[/($bbuserinfo[userid]>0 AND date("m-d")=="04-01")]]
(Remove spaces in vbcodes and edit XX with a threadid)
You can insert it now, you don't need to wait for April 1st. This announcement will be visible in that day only if visitor is a forum member (it is invisible to guests). Everyforum member will see his name in this announcement and following the link will take them to a thread of your choice. :cool:
Enjoy..
Boofo
03-22-2003, 01:03 PM
LOL at Sinan. Getting in to the old April Fool's day spirit already. ;)
Would there be a way to make an addon where you could enter pre-made announcements like this for different days of the year and it could pull it from the db as needed?
Logician
03-22-2003, 02:54 PM
yeah sure it will work :)
Pyromate
07-18-2003, 04:30 PM
NOOB | NOOB | NOOB
sorry but i want to learn !!
STEP 5- Edit forumhome/forumhome template and find:
what does that mean and where to find
vbulletin.style ? or index.php ?
lol totaly noob
thx for your knowlege and helping me !!
greetz | pyromate
Logician
07-19-2003, 11:30 AM
Login to Admin CP, Click Templates/Modify/Show All, find template named "forumhome" and edit it.
robinsf
07-31-2003, 01:10 PM
I just upgraded and lost my announcement hack -- any special instructions or should I use the same one for v2.9?
Logician
07-31-2003, 05:18 PM
for 3.0? This hack is not coded for vb 3.0.
If you meant 2.3.0, first reapply hack steps accept running install file and it should work. And if it does not, run the install file too.
lasto
08-31-2003, 02:59 PM
Logician quick question
wot server load or queries will this add to main page regardless of announcments it is showing ?
Logician
08-31-2003, 05:12 PM
none
lasto
08-31-2003, 08:41 PM
/me lied LOL
one more question i have a page that is php how can i make this program call it in (im sure its possible if i read right)
example i want to call in a page called index.php which aint part of vbull but i want to give it the vbull members access masks so i can let certain users have access
Logician
08-31-2003, 09:15 PM
Today at 12:41 AM lasto said this in Post #168 (https://vborg.vbsupport.ru/showthread.php?postid=430180#post430180)
* lasto lied LOL
one more question i have a page that is php how can i make this program call it in (im sure its possible if i read right)
example i want to call in a page called index.php which aint part of vbull but i want to give it the vbull members access masks so i can let certain users have access
Where did you read it?
It is not possible unless you integrate that page into vb. You can get info for this integrations in general discussions forum. Search for keyword "require('./global.php');"
lasto
08-31-2003, 09:54 PM
my fault i got it wrong - was this i read
You can enter here a PHP code which will be parsed BEFORE webtemplate is loaded. This works exactly as vb's default phpinclude template. It is just different in that this include will be parsed before this webtemplate while vb's phpinclude is always parsed. Leave blank for no inclusion.
so failing that then,if i do an html page and include the page i want at the top of the html page this will work then ?
Logician
08-31-2003, 10:10 PM
Are you trying to include:
a) dynamic announcement in a non-vb page?
b) a html page inside a webtemplate?
c) the announcement in a webtemplate?
lasto
09-01-2003, 07:52 AM
installed and works fine
/me clicks install
lasto
09-01-2003, 08:29 AM
one thing is smilies etc supposed to show up in this box as when i do one the announcement shows up but the smilie i entered shows as text.
any idea why cause the hack works fine besides that.
Logician
09-01-2003, 09:02 AM
Searched thread? I believe somebody else had a similiar problem and it is likely that I had provided a solution. I think...
Wolverine
09-09-2003, 09:12 PM
Great hack, though I am having a small problem.
The install seemed to go well but the announcement is not showing up on my forum homepage. I removed the default conditional message and replaced it with a standard text message so that it would apply to all user groups, still nothing.
Where would you suggest I begin my troubleshooting?
I am running version 2.8.0
robinsf
09-14-2003, 12:10 AM
for 3.0? This hack is not coded for vb 3.0.
If you meant 2.3.0, first reapply hack steps accept running install file and it should work. And if it does not, run the install file too.
Ran the install file, re-implemented all the steps and still not working in v2.3.2
robinsf
09-14-2003, 12:11 AM
Forgot to add... I now have 2 copies of the DFA option in admin cp.
EchoHype.com
09-14-2003, 12:30 AM
logician- how hard would it be to get this working on 3.0, beta 6?
Logician
09-14-2003, 11:12 AM
Great hack, though I am having a small problem.
The install seemed to go well but the announcement is not showing up on my forum homepage. I removed the default conditional message and replaced it with a standard text message so that it would apply to all user groups, still nothing.
Where would you suggest I begin my troubleshooting?
I am running version 2.8.0
Make sure you applied all steps correctly (Do not reapply step 1, if you already did). Especially make sure:
a) In Step 4 you applied the correct code according to your vb version
b) In STEP 3, you created the template IN ALL template sets if you have more than 1.
c) In STEP 4, you are adding the code into forum/index.php, NOT forum/admin/index.php
Ran the install file, re-implemented all the steps and still not working in v2.3.2
I didn't test this hack with 2.3.2. I tested it with 2.3.0 though and it is working ok so I wouldn't expect any problems in 2.3.2 too. See my suggestions for Wolverine above.
To fix double options problem: (which happened because you ran the file in step 1 twice):
Edit "forum/admin/config.php", at the end file find the line ?> and before that add:
$debug=1;
Then close all your browser windows, open again and login into your admin cp. You'll see a new link named "Edit Settings" under "vb options", click it and scroll at the end of page. You see double "Dynamic Forum Announcements Hack" link there, remove one of them. Then edit your config.php file again and remove the line you added there.
how hard would it be to get this working on 3.0, beta 6?
I don't know. I didn't look at it yet. As you know VB3 hacking is not allowed at the moment.
Wolverine
09-21-2003, 02:26 PM
Thanks a bunch! I did indeed manage to add the code to index.php in the admin folder by mistake. Works great now, thanks a ton :)
liquidblaze
10-06-2003, 07:48 PM
i am aware that this hack is kinda old, yet its the perfect thing for me...
i installed it into my main style and followed the install file to the end (well at least i think so) but the announcement doesnt show up somehow.
instead index.php shows "l l " before everything else and in options.php i also have a "l l " before everything else.
any help on that would be appreciated.
[EDIT]
i figured as much as that it has to do with the templates - as the || shows up in every page.
im using 2.3.2 at the moment.
Logician
10-06-2003, 08:21 PM
i am aware that this hack is kinda old, yet its the perfect thing for me...
i installed it into my main style and followed the install file to the end (well at least i think so) but the announcement doesnt show up somehow.
instead index.php shows "l l " before everything else and in options.php i also have a "l l " before everything else.
any help on that would be appreciated.
I can not suggest much except advising to uninstalle first and then reinstalle. Apparently you installed it wrongly.
liquidblaze
10-06-2003, 09:31 PM
i edited all the files i edited previously and killed the entries in SETTING and SETTINGGROUP. anything more?
[EDIT]
index.php doesnt show anything now except || and if i access anything inside /admin it also get tagged with the || thing. i killed the templates aswell and edited forumhome.
[EDIT]
found the prob ... a very strange prob occured. while i was coding an instant message window popped up and i entered some text there.. then returned to coding view but the im window remained active somehow and i entered some letters in the functions.php :) all solved now... now im going to get that announcement thing working.
liquidblaze
10-06-2003, 10:01 PM
forgive me my being a noob ... it works (as always)
this was my 25th hack i installed and i would have been kinda ++++ed if it didnt work out :) but all is fine.
Logician
10-07-2003, 07:12 AM
ok glad you solved the issue :)
liquidblaze
10-07-2003, 07:50 AM
sweet hack :) thanks for writing it
trekwarfare
10-14-2003, 11:46 PM
WOW! Works great! Running 2.3.2 and this installed with no problems!
Thanks!
klaattu
10-16-2003, 03:07 AM
MEGA super cool hack installed it, had some minor problems but fixing them I spoted some other bad parsings etc, everythings works perfect took 20 minutes and then I installed it in my other forum in 6 minutes, Works like a dream in 2.3.0.
THANKS AGAIN
klaattu
10-19-2003, 01:02 AM
One question:
Can I put in the conditionals an image path instead of some text?
For example I put [i m g] bal bla bla path to image [/img]
and Will it show up?
Logician
10-19-2003, 06:44 AM
One question:
Can I put in the conditionals an image path instead of some text?
For example I put [i m g] bal bla bla path to image [/img]
and Will it show up?
yes.. announcements are parsed for smilies, [i m g ] tags, an all other vb tags that is available in your board..
klaattu
10-19-2003, 04:23 PM
cool thanks Im going to give a shot now!
togoodhlth
10-29-2003, 12:40 AM
Yeah this is definitely a very useful hack which i am going to install as soon as I finish the chat box!
klaattu
10-29-2003, 01:47 AM
This hack is very cool and very aesy to install and customize and also uses codes so you can put smilies inside and also Images and links.....very cool for events for example..here is a shot of the site (one for registered users another for unregistered and another for holidays and spacial announcemnets..)
Waaaayyyy coool !
calvinnguyen
11-04-2003, 01:00 AM
It is very nice tips!Thanks alot
calvinnguyen
11-09-2003, 06:52 AM
Is this work with vb3 beta 7? thanks
Hmmm
What would cause the [url] tag parsing not to work?
EDIT: None of the vB code seems to work. Checked code twice. Anyone had this happen?
Skipsoutdoors
12-13-2003, 06:46 AM
Logican,
Thanks for another very useful hack. I just installed it. Hopefully it'll get some of my people to check their PM box.
That makes 2 of yours that I'll have to wait to be converted before switching to vb3.
Skip
Skip's Outdoors
calvinnguyen
01-03-2004, 12:53 AM
How can I removed Dynamic Forum Announcements from my database. Right now I am run vBulletin Version 3.0.0 Release Candidate 1. Right now I had problem with it, so I like to remove it. Anyone know how to do it?
Logician
01-03-2004, 08:11 AM
How can I removed Dynamic Forum Announcements from my database. Right now I am run vBulletin Version 3.0.0 Release Candidate 1. Right now I had problem with it, so I like to remove it. Anyone know how to do it?
add line
$debug=1;
in your includes/config.php file
Login to your admin cp
choose vb options and edit dynamic forum announcement hack. You'll see 2 DELETE links to delete the settings. First delete the below, then the title. After you're done, remove debug line from your config.php
Ok, call me dumb...LOL I am new to VB. BTW....love love love this hack....*hits install*...
How do I find out what my Usergroup ID numbers are??? Is it the way they are listed ie...
(COPPA) Users Awaiting Moderation =9
Administrators =8
Imported Banned Users =7
Jr. Moderator =6
Moderator =5
Registered =4
Super Moderators=3
Unregistered / Not Logged In=2
Users Awaiting Email Confirmation=1
Is that how it would work??? That is exactly how mine is setup when I go to admin cp / modify user group.
Any help would be appreciated. I want to make sure the right usergroup sees the correct message.
Thanks....
Kerr
ExoticPetHaven.com (http://www.exoticpethaven.com/vb)
EDIT: SORRY the one page I didnt read had the link on there....next time I will read every single page. Thanks!
Logician
01-23-2004, 01:57 PM
Ok, call me dumb...LOL I am new to VB. BTW....love love love this hack....*hits install*...
How do I find out what my Usergroup ID numbers are???
If you right click Edit USergroup link and open in a new window you will see its usergroup id in the URL like:
http://......../usergroup.php?s=&action=edit&usergroupid=4
oK....got a few more quick questions...
Why does it show the link to my image and not my image??? (code below)
What is the correct way to add <br> and <center> to my message? I cant get those to parse correctly they just keep showing up as is instead of doing what I want LOL.
Heres the code as is now......
[[($bbuserinfo[userid]>0)]][i m g]http://www.exoticpethaven.com/vb/images/announcementpic.jpg[/img]
We would like to welcome all our new members to our permanent home!
We hope you enjoy yourself here and stick around for a long time.
We all look forward to making some great friends.
We would like to thank everyone for their patience while we upgrade and add some great things that we all can enjoy.
Please know that over the next few weeks off and on we will be down for small periods of time due to the addition of a few things here and there. Enjoy your stay....see you in the forums!
Sincerely, The EPH Admins and Mods.[[/($bbuserinfo[userid]>0)]]
The [img] tag of course is not spaced I did that so you could see the code. On my site it just shows the link.
Ok...fixed the problem with the pic not showing...it had to do with general settings of my board nothing with your hack (as I figured :))
Now...I just cant get anything to center....Is there another way to do ...in a nother file? I am still stumped on that one. Thanks for any help you can give me.
Logician
01-24-2004, 09:01 AM
If you have problems displaying HTML/smilie/bbcode in your announcement, make this tiny change in hack code (which is in STEP 2):
Find:
$matches14[2]=bbcodeparse(trim($matches14[2]));
Replace it as:
$matches14[2]= bbcodeparse2(trim($matches14[2]),1,1,1,1);
This will fix your problem..
klaattu
03-01-2004, 11:35 PM
One quick question:
I have already put images and everything, it works perfectly .
Is there a way in which I can for example make a folder and put 10 images inside and make a conditional so the hack pulls a random one from the folder and put it in the announcemnets hack?
that would make me very happy
Logician
03-02-2004, 06:30 AM
Is there a way in which I can for example make a folder and put 10 images inside and make a conditional so the hack pulls a random one from the folder and put it in the announcemnets hack?
nope
ctsolutions
03-12-2004, 05:55 PM
<font color="DarkOrange">Absoluetly brilliant hack</font>
Thanks,
CtSolutions
As always, this is a wonderful hack, Logician! I've actually used it for a while, but only now got around to re-adding it to my upgraded forum.
Quick question about the fix code posted in #205. Is there an extra space in the replacement line?
Find:
$matches14[2]=bbcodeparse(trim($matches14[2]));
Replace it as:
$matches14[2]= bbcodeparse2(trim($matches14[2]),1,1,1,1);
My functions.php stopped working when I used the above replacement code.
Instead, what worked for me was:
$matches14[2]=bbcodeparse2(trim($matches14[2]),1,1,1,1);
Dunno if it's just me, but anyway, I thought it might help anyone who had the same problem. :) Thanks again for the great work, Logician!
Logician
04-24-2004, 06:59 AM
Instead, what worked for me was:
$matches14[2]=bbcodeparse2(trim($matches14[2]),1,1,1,1);
Thx for sharing it Kira but it really can not matter :) These 2 lines have the same meaning in PHP so you can have a space or not. I guess your problem was something else and you accidenly fixed it while adding the space ;)
Symbian.info
09-16-2004, 04:18 PM
How can U uninstall it from the Admin CP? I allready use it no more because I have V 3.03 but it stills standing in Admin CP. So how can I delete that??
Logician
09-16-2004, 04:52 PM
How can U uninstall it from the Admin CP? I allready use it no more because I have V 3.03 but it stills standing in Admin CP. So how can I delete that??
They are harmless there if you removed the hack from the code but if you like to delete them anyway, follow instructions here:
https://vborg.vbsupport.ru/showpost.php?p=455053&postcount=199
Symbian.info
09-16-2004, 05:27 PM
Thanks that works.. Angain I learn something!! Great..
Sorry was cleaning up some junk left over after the update van v2. to v3. long time a go..
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.