vb.org Archive

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

Mechanical Mind 01-23-2005 03:52 PM

Does anybody know how to change the position of the pop-up window in relation to the forum or to modify the color?

kall 01-23-2005 11:12 PM

Quote:

Originally Posted by Mechanical Mind
Does anybody know how to change the position of the pop-up window in relation to the forum or to modify the color?

1. Change the position of $dfh_announcement in your FORUMHOME template to where you want it.

2. Edit aforementioned template's DIV or TD attributes to make it look how you want.

A slightly modified version (mine) is here: http://forums.nzboards.com/index.php

Takamine334 01-23-2005 11:59 PM

Would this work for X days and X time?

Ex. Message would show up only on Monday through Friday from 9am-5pm ?

T3MEDIA 01-24-2005 04:04 AM

Quote:

Originally Posted by T3MEDIA
Hey how about a clean list of commands for other users to use? that would be nice

guys? at lest respond to one of my posts... lol

Logician 01-25-2005 07:24 AM

Quote:

Originally Posted by djjeffa
i upgraded to 3.0.5 and its in my admin panel but its not showing up.
can I get a lil help?

Do you mean admin interface is there but announcements not showing up? Have you reapplied the code changes after you upgraded? Also check if template modifications are also valid. You may lose them if you reverted your templates.

Logician 01-25-2005 07:26 AM

Quote:

Originally Posted by T3MEDIA
Hey bro...
how do I do a syntax for something that is null?
=="" I am not sure if "" is ok. or can I do ()

Not sure what you mean but in php this conditional checks whether the variable is blank or now: $variable==''

Does it answer your question? If not, plz elborate.

Logician 01-25-2005 07:31 AM

Quote:

Originally Posted by master786
Nice hack but its size is too much. Our forum's speed is slow after we installed this hack. Can you please tell me the easiest way how to uninstall this hack?

I wouldn't suspect this hack as the culprit of the slowness. It has really no performance problems and it is running in hundreds of boards some of which are most largest vbulletin boards with heaviest traffic.

But if you still like to remove it here is how:
a) Delete the codes you added to .php files.
b) Turn debug mode on in your board (https://vborg.vbsupport.ru/showthrea...bug#post504557), then go to vb admin cp/options and remove the hack options by following the new removal links you'll find there.
c) Template modifications are harmless but if you want, you can remove them either by deleting the new templates hack added or deleting the HTML lines you added in existing templates.

Logician 01-25-2005 07:42 AM

Quote:

Originally Posted by lanc3lot
It works ok... But just in case, is there any uninstall script to have?

Please see my message above this one.

Quote:

Originally Posted by lanc3lot
Also, what is the "load" of page, that creates

No significient load. It is performance friendly. It just adds a single query to forum home page loads, provided that you installed as it is. However if you change the installation or working of the hack and say applied the announcements in all forum pages (hack of the hack 1), then additional query applies for all vb pages. My recommendation is to run it as it is, ie in main page only.



Quote:

In your first Hack, of the hack, u say: (at the end)
Now put
$dfh_announcement_headercode
$dfh_announcement_popup
$dfh_announcement
variable in any template you like

What do u mean with that? I must do something else, so this will work on every page?
The hack is coded to work only in forum home page. However some users want to display the announcements in different pages or in every vb pages so hack of the hack you mentioned aims to do it. The template you need to modify will change according to the page you like to display the announcement so I can not tell you to "modify template X" in this scenario. It depends on your intention. However for all vb pages, the template to modify will be "header". Hope this helps.


Quote:

Is there any way, i can "change" the background color of the table of the announcement, the color of the text and the font size of the text?

I tried a code like:
Code:

<td style="background-color:#000000;color:#FF6600;font-size:9px;">
but it didnt work:( Can i do it differently?
You mean the color and font of popup announcement right?

Edit template "dfh_announcement_popup" and change the section that says "background-color: lime;" for the bg color. And for the font change this section:

PHP Code:

<div class="normalfont">$dfh_announcement_popuptopaste</div

to something like this:
PHP Code:

<font size='10'>$dfh_announcement_popuptopaste</font


Quote:

Something last...To add more than one announcement, i just write them under the first one?
You can have more than one announcements in the conditional format. But only one of them will be showed to the user (the higher one) where the conditional applies.

Logician 01-25-2005 07:44 AM

Quote:

Originally Posted by kall
*bangs head on desk in frustration*

Well, I have tried to work out how to get 'Your Paid Subscription expires in X days' to display, but can't for the life of me think of what the variable might be to call. :(

Please, oh great Logician, tell me if this is even possible. :)

Unfortunately this can't be done with this hack because this info is not valid in vb code until you specificially query the db to get it.

Logician 01-25-2005 07:52 AM

Quote:

Originally Posted by Takamine334
Would this work for X days and X time?

Ex. Message would show up only on Monday through Friday from 9am-5pm ?

yes possible.

PHP Code:

[[((date("w")>=AND date("w")<=5) AND (date("H")>=AND date("H")<21))]]
Day is now between monday to friday and hour is between 9.00 AM to 8.59 PM
[[/((date("w")>=AND date("w")<=5) AND (date("H")>=AND date("H")<21))]] 


Kihon Kata 01-26-2005 04:58 PM

**CLICKS install**

Thanks Logician for helping me install it, the best popup hack around

click here to see it in action!

If you register, you will see another that I have set up promoting 5 posts right away

carolmyt 01-28-2005 07:34 PM

Has anyone tried this in 3.0.6 yet?

Also, if I install this, I'm going to use the popup. As long as there is no text, will there be no popup, or will it popup as blank? I don't plan on having anouncements every day, and I don't want to see the box if there's nothing in it.

Thanks!

docvader 01-28-2005 07:40 PM

It works in 3.06. And if you keep the pop up box blank in your admincp, there will be no pop up/ Use the addition mentioned previously, to have it only pop up once in x hours, otherwise your members will go nuts seeing it every time they hit their forum index page.

carolmyt 01-28-2005 09:19 PM

There's no way for it to only popup once for each user visit?

Mechanical Mind 01-28-2005 10:13 PM

Quote:

Originally Posted by carolmyt
Has anyone tried this in 3.0.6 yet?

Also, if I install this, I'm going to use the popup. As long as there is no text, will there be no popup, or will it popup as blank? I don't plan on having anouncements every day, and I don't want to see the box if there's nothing in it.

Thanks!

There will be no pop-up if no text. There will be no announcement if no text.

T3MEDIA 01-28-2005 11:36 PM

Quote:

Originally Posted by Logician
Not sure what you mean but in php this conditional checks whether the variable is blank or now: $variable==''

Does it answer your question? If not, plz elborate.

ok I am still stuck with that field 20 thing. I want users to enter thier names... I can see if I put the field using your hack it will actually print whats in there. SO I know I can use it some way. Just dont know how to make it say if field 20 is empty show this dam hack! LOL. $variable="" how would that look in your hack? I been trying this for a while now. really tring to get this to work.

T3MEDIA 01-28-2005 11:39 PM

Quote:

Originally Posted by T3MEDIA
Will it work for Single-Line Text Boxes then???

bump PLEASE?

Logician 01-29-2005 07:31 AM

Quote:

Originally Posted by carolmyt
There's no way for it to only popup once for each user visit?

I've released the hack of hack for this in the thread please look for it.

Quote:

ok I am still stuck with that field 20 thing. I want users to enter thier names... I can see if I put the field using your hack it will actually print whats in there. SO I know I can use it some way. Just dont know how to make it say if field 20 is empty show this dam hack! LOL. $variable="" how would that look in your hack? I been trying this for a while now. really tring to get this to work.
[[($bbuserinfo[field20])]]
Your name is $bbuserinfo[field20]!
[[/($bbuserinfo[field20])]]
[[(!$bbuserinfo[field20])]]
You didn't enter a name in your user cp
[[/(!$bbuserinfo[field20])]]

carolmyt 01-29-2005 01:38 PM

Thanks!

T3MEDIA 01-29-2005 02:35 PM

Quote:

Originally Posted by Logician
I've released the hack of hack for this in the thread please look for it.


[[($bbuserinfo[field20])]]
Your name is $bbuserinfo[field20]!
[[/($bbuserinfo[field20])]]
[[(!$bbuserinfo[field20])]]
You didn't enter a name in your user cp
[[/(!$bbuserinfo[field20])]]

Doesnt work the second part. I can show the stuff that I knew...
I have a few... can you show me one that can work for one of these?
Multiple-Selection Checkbox
Single-Selection Menu
or Single-Line Text Box
this doenst work for any of them.

Logician 01-29-2005 04:29 PM

Quote:

Originally Posted by T3MEDIA
Doesnt work the second part. I can show the stuff that I knew...
I have a few... can you show me one that can work for one of these?
Multiple-Selection Checkbox
Single-Selection Menu
or Single-Line Text Box
this doenst work for any of them.

My code will work for "Single-Line Text Box". As I have mentioned before what you want can not be done for other type of profile fields due to the structure of the hack.

Cancorp 01-30-2005 05:09 AM

Quote:

Hi all:

I hate like hell to do this, but I am stumped. I have gone over the install process 6 times now, and I just can't see what I've done wrong.

Installed the original hack. Changed it according to Hack 1 of the Hack to be able to show where desired.

I can get the static announcement to show up with no problems, anywhere I want.

I CANNOT get the popup to display anywhere!?!?! The text entry box appears in UserCP. I can take a static conditional that shows up fine and put it into the popup textarea and nothing.....

What could I have loused up to not make the popup work?

I am using the latest version of IE and a fairly hacked up vB 3.0.5

**EDIT** Just as an FYI, I can preview the popup template in the template editor and it looks as you would expect.....
Ok, I solved this and have egg on my face :o

Rather than delete my post, I am going to leave it there in case there is someone else out there who might run into this and pull their damn hair out.

The popup box was hidden by my .swf header :o For whatever reason, the popup appears behind the .swf header, so since I only had a small amount of text in the box, I couldn't see it.

I suggest that if you think you can't find your popup box and you have a .swf header, change the positioning of your popup box so that it shows lower down on the page....

*Goes to wipe egg off of face before birds start to flock around*

T3MEDIA 01-30-2005 04:11 PM

Quote:

Originally Posted by Logician
My code will work for "Single-Line Text Box". As I have mentioned before what you want can not be done for other type of profile fields due to the structure of the hack.

Yes that is why I re structured the question. Sorry for the bad englisih.
This answer will help me I belive. (single line) I will try this now. Thank you.

bigmonay2k 02-02-2005 01:07 PM

Quote:

Originally Posted by bigmonay2k
I got this... what I am doing wrong?? Fatal error: Call to undefined function: dynamic_a() in /home/gamewar2/public_html/forums/index.php on line 427

:disappointed:

Logician 02-02-2005 02:34 PM

Quote:

Originally Posted by bigmonay2k
:disappointed:

You forgot to install STEP 3 (or installed wrongly). Double check.

T3MEDIA 02-12-2005 09:41 PM

I was looking at this on a mac and it just shows a white box.
Any ideas why?
Does anyone care?

Viks 02-13-2005 11:23 PM

umm... today i made some changes to the text and i noticed im not able to add a HREF tag on the forumshome header text BUT the same href code works perfectly with the pop-up...
i am certain, it has to do with some setting...any idea where i can go and fix it.

SaN-DeeP 02-15-2005 09:32 AM

Quote:

Originally Posted by Viks
umm... today i made some changes to the text and i noticed im not able to add a HREF tag on the forumshome header text BUT the same href code works perfectly with the pop-up...
i am certain, it has to do with some setting...any idea where i can go and fix it.

href works fine here.. on forumshome as well

Regards,

MAK-upl 02-18-2005 02:23 PM

works on 306 - clicks install

greenhybrid 02-22-2005 11:06 PM

Mine flipped out on the very first step by throwing up an unexpected ] on the following line:

PHP Code:

            $xml .= "\t<setting varname=\"$set[varname]\" displayorder=\"$set[displayorder]\"" iif($set['advanced'], '],'],' advanced="1"') . ">\r\n"


KanyeWest 03-01-2005 07:12 PM

how do i make it so only guests see the pop up and not my member who registered already?

paulomt1 03-01-2005 11:38 PM

works on 3.0.7 - clicks install

Logician 03-02-2005 07:04 AM

Quote:

Originally Posted by KanyeWest
how do i make it so only guests see the pop up and not my member who registered already?

https://vborg.vbsupport.ru/showpost....52&postcount=2

HarryBO 03-04-2005 11:00 AM

The Hack works perfectly, but after a server Update the box is gone! Can anybody help?

Logician 03-04-2005 04:04 PM

Quote:

Originally Posted by HarryBO
The Hack works perfectly, but after a server Update the box is gone! Can anybody help?

what kind of a server update it was (vb upgrade?) and which box is gone? (the one you set your announcement in admin cp/options?). If so apply instructions step 1 and 2 and you should be fine.

T3MEDIA 03-04-2005 05:43 PM

Quote:

Originally Posted by Logician
My code will work for "Single-Line Text Box". As I have mentioned before what you want can not be done for other type of profile fields due to the structure of the hack.

Any type of work around? Is this also restricted to your templates hack?

Mu5icMan 03-09-2005 02:25 PM

Is there a way to set the conditionals to have it only displayed once?

Can i use HTML within the message?

I also made a slight mistake when doing forum home table announcement and popup announcement, how do i edit the data in them?

Mu5icMan 03-10-2005 10:23 AM

If any of you get a parse error line 16, i changed to https:// instead of http and it worked.

Logician 03-10-2005 10:30 AM

Quote:

Originally Posted by Mu5icMan
If any of you get a parse error line 16, i changed to https:// instead of http and it worked.

How come you come up with that error anyway? There is no "https://" in anywhere of this hack. ^^

Mu5icMan 03-10-2005 10:38 AM

there is. when you said, http://YOUR_SITE_URL/FORUM_URL/admin...le=dynamic_fha

if your site uses https:// as mine does and you don't include the secue layer you will recieve parse error 16


All times are GMT. The time now is 02:34 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.01639 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
  • (28)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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