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)

Logician 08-21-2004 01:02 PM

Quote:

Originally Posted by kall
Kall's DFH-vBA_CMPS Integration :

Thx for sharing it. I've referred it in the first post.

adieball 08-24-2004 04:32 PM

Hi there.

First of all: great hack, thanks a lot for the work you've done.

During install I encountered some problems I can't resolve (tried for hours now without success)
I've got the default style of vb 3.0.3 installed and another style (ambience by extremepixels). Everything works fine with the default style, but the message bar nor the popup seem to work under the other style. I've created the templates in both styles and changed the FORUMHOME tamplete as well in both styles.

Does anyone has any idea why it doesn't work with the style of extremepixels?

any help is highly appreciated.

Thanks

Andre

adieball 08-24-2004 04:37 PM

Quote:

Originally Posted by adieball
Hi there.

First of all: great hack, thanks a lot for the work you've done.

During install I encountered some problems I can't resolve (tried for hours now without success)
I've got the default style of vb 3.0.3 installed and another style (ambience by extremepixels). Everything works fine with the default style, but the message bar nor the popup seem to work under the other style. I've created the templates in both styles and changed the FORUMHOME tamplete as well in both styles.


Stupid me .... forget this post, I solved it. I just forgot to change the adv_portal template as well ....

Andre

BunkTek 08-26-2004 02:12 PM

Dumb question coming.

We had a database crash Sunday and lost everything. When I was reinstalling DFA I messed up on the variable for the dynamic_announcement_popup. In the options I put "test" instead of "text". I need to remove the variable and redo it, but can't figure out how. Dumb mistake, dumb question, but I've been working on getting our board back up.

Thanks for any help.

Logician 08-26-2004 04:26 PM

if you add
$debug=1;
to your includes/config file (before ?>) you will be able to edit/delete any settings in your vbulletin but be careful while playing with them.

proxyMX 08-26-2004 10:04 PM

Quote:

Originally Posted by Boofo
Are you planning on releasing a version that does?

btw this is the greatest hack ever

duncan99 08-26-2004 11:31 PM

Very useful hack, installed it. Thank you Logician .

One small request, since the announcement editor is so small, could you please show me how to add a larger editor on it?

I found the statment :

print_textarea_row($vbphrase['signature'], 'signature', $user['signature'], 8, 45);

This one gets the Larger edit box, but wonder where I can find the right place to replace the small input text.

Thanks.

BunkTek 08-30-2004 01:28 PM

Thanks Logician. I got the popup textarea fixed.

I got everything set up, seems to be working with everything but the index.php. I get the following error:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in
... /index.php(429) : eval()'d code on line 2

I'm assuming that the message means there is something wrong with line 429, not sure if this is right or not. Looking at it in my editer I see the following (line 429 is bold):

Code:


// Logician Hack: Dynamic Forum Announcements Hack
if ($vboptions['dynamic_fha'] OR $vboptions['dynamic_popup']) {require_once('./includes/functions_bbcodeparse.php');}

if ($vboptions['dynamic_fha'])
{
eval('$dynamic_fha = "' . addslashes($vboptions['dynamic_fha']) . '";');
$dynamic_fha=str_replace("\\'", "'", $dynamic_fha);
$dfh_announcement_announcementtopaste = dynamic_a($dynamic_fha);
if (trim($dfh_announcement_announcementtopaste)) {eval('$dfh_announcement = "' . fetch_template('dfh_announcement') . '";');}
}

if ($vboptions['dynamic_popup'])
{
eval('$dynamic_popup = "' . addslashes($vboptions['dynamic_popup']) . '";');
$dynamic_popup=str_replace("\\'", "'", $dynamic_popup);
$dfh_announcement_popuptopaste = dynamic_a($dynamic_popup);
if (trim($dfh_announcement_popuptopaste))
        {
        eval('$dfh_announcement_headercode = "' . fetch_template('dfh_announcement_headercode') . '";');
        eval('$dfh_announcement_popup = "' . fetch_template('dfh_announcement_popup') . '";');
        }
}

// Logician Hack: Dynamic Forum Announcements Hack

I copied and pasted from the instructions, so it should be fine, it worked fine when I first installed it. I stared at it for an hour or so last night, but I can't see anything wrong with it.

Thanks for any help or ideas.

Logician 08-30-2004 01:42 PM

Quote:

Originally Posted by BunkTek
I copied and pasted from the instructions, so it should be fine, it worked fine when I first installed it. I stared at it for an hour or so last night, but I can't see anything wrong with it.

Very likely its your conditional set that is incorrect. Remove it (use a plain announcement without a conditional) and the error will go.

BunkTek 08-30-2004 01:55 PM

Yep, that worked. Thanks for the quick response.

I had a conditional to show a message to everyone and then a conditional to show a message to a certain user id, removed the 2nd and it works fine.

Is there a way to make the popup "move" when people scroll their browser down... so that it remains in the same relative spot in the bowser?

Would that be done by changing the "position: absolute;" to "position: relative;" in the template?

Host Directory 08-31-2004 03:21 PM

Does anyone know how to set up a conditional so that a message will display to users who have registered but not yet confirmed their registration with the confirmation email ?

The reason i would like to know if this is possible is because i have noticed that a lot of my users have not been posting - i have also realised that many confirmation emails are being bounced back to my email account due to over zealous spamming software.
There is a lot of users which would never recieve their confirmation email because of this and think the error is with my forum rather than their email client.

I want to put a message for these people to tell them that if they have not recieved their confirmation email to use another email address or email me so that i can confirm their registration manually.

Logician 08-31-2004 03:39 PM

Quote:

Originally Posted by Host Directory
Does anyone know how to set up a conditional so that a message will display to users who have registered but not yet confirmed their registration with the confirmation email ?

[[($bbuserinfo[usergroupid]==3)]] Show this announcement if page visitor is from email confirmation waiting usergroup[[/($bbuserinfo[usergroupid]==3)]]

Host Directory 08-31-2004 03:42 PM

Thanks Logician, i will install this hack and test the conditional later today.

Host Directory 08-31-2004 05:49 PM

Quote:

Originally Posted by Logician
[[($bbuserinfo[usergroupid]==3)]] Show this announcement if page visitor is from email confirmation waiting usergroup[[/($bbuserinfo[usergroupid]==3)]]

Works a treat Logician !
Try it yourself - www.hostcompanies.com/forums - register and then do not confirm by email - now login and your see the message explaining that the email may have been bounced. Obviously you can't post either. Now confirm the registration email and the message dissapears and everything works fine.

Brilliant !

I have recently had a lot of bounced emails from people trying to register because of their stupid spam software - thats one of the reasons why people sign up and never post. Atleast they now know its their email spam software which is the problem.

Your a star Logician... a star!

ranger2kxlt 08-31-2004 07:05 PM

What is the code to add for custom fields? I added a location field and would like all my members to fill it in, can you give me the code to do so?

Thanks

Logician 08-31-2004 07:36 PM

Quote:

Originally Posted by ranger2kxlt
What is the code to add for custom fields? I added a location field and would like all my members to fill it in, can you give me the code to do so?

Thanks

correct thread?

ranger2kxlt 08-31-2004 07:48 PM

Sorry logician, let me explain a bit more....

I want my members to show their location on post bits, and since i added this after i had about 100 members and before i made it a req. field a few are missing the info. But Its a custom field, and I want a pop-up to show for those members that don't have this filled in yet. Any curdentials i can add that will show this info?

Thanks

Logician 08-31-2004 08:01 PM

Quote:

Originally Posted by ranger2kxlt
Sorry logician, let me explain a bit more....

I want my members to show their location on post bits, and since i added this after i had about 100 members and before i made it a req. field a few are missing the info. But Its a custom field, and I want a pop-up to show for those members that don't have this filled in yet. Any curdentials i can add that will show this info?

Thanks

I see! This should help:

[[(!$bbuserinfo[fieldX])]] You haven't filled the location field yet! Please do so by following the link to your profile edit page. [[/(!$bbuserinfo[fieldX])]]

(X should be replaced by the profile field id of your location field.)

kristian 09-02-2004 03:45 PM

<font size="1">Thanks Logician (clicks install)</font> :devious:

craig hughes 09-07-2004 05:37 PM

I can honestly say this is one of the most beneficial, easy, (should have been in the final vb3 release) hack sever. Very well done.

I have a PAY only site and this is exactly what I needed to give the site the locked door with info treatment

WELL DONE!!!!!

nelto 09-08-2004 07:02 AM

I tried to install this hack but something came up.
After I uploaded the file functions.php I got this erros:

Parse error: parse error in /usr/home/kain/domains/bbs.tgpbuilders.com/includes/functions.php on line 1887

Fatal error: Call to undefined function: devdebug() in /usr/home/kain/domains/bbs.tgpbuilders.com/includes/functions.php on line 952

My line 1887: {

My line 952: DEVDEBUG("$optionname = $user[$optionname]");
Needless to say I revode the code from functions.php and the erroes still presists.
I have a comunity of 5K members so I need this resolved asap, if possible.

Im runing VB 3.0.3

P.S Every installation steps went ok untill I uploaded functions.php.

nelto 09-08-2004 07:21 AM

Never mind I dont knwo what happened.

I unziped the vb script to other folder made the changes on functions.php and uploaded everything working.

I'll let you know if everythign went fien and I'll click on the install of course :)

Logician 09-08-2004 07:25 AM

Quote:

Originally Posted by nelto
I tried to install this hack but something came up.
After I uploaded the file functions.php I got this erros:

Parse error: parse error in /usr/home/kain/domains/bbs.tgpbuilders.com/includes/functions.php on line 1887

Fatal error: Call to undefined function: devdebug() in /usr/home/kain/domains/bbs.tgpbuilders.com/includes/functions.php on line 952

My line 1887: {

My line 952: DEVDEBUG("$optionname = $user[$optionname]");
Needless to say I revode the code from functions.php and the erroes still presists.
I have a comunity of 5K members so I need this resolved asap, if possible.

Im runing VB 3.0.3

P.S Every installation steps went ok untill I uploaded functions.php.

Apply STEP 3 carefully. (For instance it is "REPLACE" it as, not add before or after).

If you are sure you applied it correctly, then the problem is the application you are editing the file. Do NOT use HTML editors like dreamweaver or frontpage to hack files. Always use notepad. This is very likely your problem. Hope it helps.

To make the board up, you can upload unhacked functions.php to the server.

nelto 09-08-2004 07:48 PM

Its working like a charm man. Great hakc you got here. Install clicked.

One question, I want to show this hack as well on the vba homepage, I was trying to follow a install instructions on other thread, but I cant find the template vba_cmp

Any help here, or is there any other way to get this working on vbahomepage?

kall 09-08-2004 07:57 PM

Quote:

Originally Posted by nelto
Its working like a charm man. Great hakc you got here. Install clicked.

One question, I want to show this hack as well on the vba homepage, I was trying to follow a install instructions on other thread, but I cant find the template vba_cmp

Any help here, or is there any other way to get this working on vbahomepage?

Im sorry, I gave the wrong name of the template.

Should be: adv_portal.

:oops: Fixed and re-uploaded.

nelto 09-09-2004 04:03 AM

working tks kall.

tanhadil 09-09-2004 12:31 PM

is there a way to show the announcement to paid subscribers only and not all the registered users??

Logician 09-09-2004 02:31 PM

Quote:

Originally Posted by tanhadil
is there a way to show the announcement to paid subscribers only and not all the registered users??

Sure.. isn't it the whole point anyway? ;) Please read second post of the thread.

(Hint: Paid subscribers would be in a different usergroup)

tanhadil 09-09-2004 08:52 PM

Hello $bbuserinfo[username]! Welcome to Desi-Dhaba forums
<div align="center"><a href="http://www.site/subscriptions.php"><img src="http://www.site/image.jpg" border="0"></a>

[[($bbuserinfo[usergroupid]==9)]] Thank you for buying the package.Link for stream will be posted soon[[/($bbuserinfo[usergroupid]==9)]]

i am typing this into the Forum Home Table Announcement in the ADMIN CP..

Usergroup 9 is for the paid subscribers...but they still cant see the message :ermm:

nelto 09-10-2004 02:06 AM

Hi again guys.
One simple question.
Isnt the pop-up supposed to be showed only to the admins and mods?
My reason is that everyone is geting it while not registered or even loged in. this includes me as well.
Im runing this hack on forums and the mod hack on the portal.

Any ideas?

Edited for a question/idea that just poped up.
Is it possible to have an announcement on the portal and a different one on the forums?

If possible can you tell me how to do it, since it will be 100% easier for me, to have 2 different messages sicne Im runing 2 different tasks.

And better yet, what about a different message for unregister users and other to register users?

Sorry if this was already questioned, but I have 45 hours nonstop and I simply dont have patience right now to scan all the thread. :(

Logician 09-10-2004 11:10 AM

Quote:

Originally Posted by tanhadil
Hello $bbuserinfo[username]! Welcome to Desi-Dhaba forums
<div align="center"><a href="http://www.site/subscriptions.php"><img src="http://www.site/image.jpg" border="0"></a>

[[($bbuserinfo[usergroupid]==9)]] Thank you for buying the package.Link for stream will be posted soon[[/($bbuserinfo[usergroupid]==9)]]

i am typing this into the Forum Home Table Announcement in the ADMIN CP..

Usergroup 9 is for the paid subscribers...but they still cant see the message :ermm:

Are you sure 9 is the MAIN usergroup of paid users? Apparently it is not.

sv1cec 09-11-2004 05:29 AM

Is there any reason why the pop-up announcements are shown in Netscape and not in Internet Explorer?

Also, I have two announcements, as shown in the code below. Shouldn't both of them be shown if a user belongs to usergroup 3?

HTML Code:

[[($bbuserinfo[usergroupid]==3)]]

Dear $bbuserinfo[username],

You have registered with our forums, but you have not responded to the registration e-mail we send you. If you do not do so in ten days, your account will be suspended.

If you have lost the registration e-mail we send you, or if you didn't receive it, please <A HREF="http://forum.m1911.org/sendmessage.php" target="_blank">contact us</a>, so that we re-send it to you.


Thank you for being here.

The M1911.ORG Forums Site Team

[[/($bbuserinfo[usergroupid]==3)]]


[[($bbuserinfo[usergroupid]>=0)]]

<B>September 11th</B>

Some text here.

[[/($bbuserinfo[usergroupid]>=0)]]

From the two announcements above, only one of them is shown, the one which is first in the list.

Tnx and regards

--------

John

Logician 09-11-2004 07:47 AM

only first matched announcement is displayed by the hack. You can combine them into one if you like to display both. If netscape is displaying, IE should also display.

sv1cec 09-11-2004 06:39 PM

Quote:

Originally Posted by Logician
only first matched announcement is displayed by the hack. You can combine them into one if you like to display both. If netscape is displaying, IE should also display.

Well, I have the announcement shown in Netscape, but not in IE. Maybe it has something to do with my settings in IE, I do not use it much, so I do not remember all the settings I've changed. Can you please check my site and let me know? It is located at http://forum.m1911.org. I would certainly appreciate it.

As for my other question, I would think that it is more reasonable, if there is a no-conditional announcement, that announcement to be shown to everyone, even if they fall in one of the other conditionals. In that way, a general message could be shown to everyone, together with a specific message to a particular user group, for example.

Rgds and tnx for this hack.
-----------

John

Bobbo 09-17-2004 08:31 PM

Thanks again for this hack Logician. I've made some minor tweaks to this and have it running in VBA CMPS, additionally, I am passing different custom variables via the URL to also get different content to display in different situations. It works great.

I've come across a specific application where I'd like to have a hyperlink that activates the $dfh_announcement_popup on the current page. I realize this is out of the scope of this hack, but if anyone has any ideas, I'd certainly appreciate it.

[Off Topic] The popup contains a flash search tool with predefined searches to help new users find relevant content [/Off Topic]

The trouble for me has been finding a way to activate it on the current page. I'd rather allow the popup to occur on any page the user happens to be on via a clickable 'toggle' rather than routing to a whole different page and then letting the page load the popup...

Thanks.

AcidJazz 09-19-2004 02:29 AM

Logician you rock! :)

Symbian.info 09-20-2004 03:12 AM

I did use this hack on vb v2.x. And I love it, What I didn't like was the very small editor box.. Way to small to get a overview of all the messages.
So is there a beter editor for the vb 3.x version?? If not, can somebody make a hack for it??

lazytown 09-22-2004 10:52 PM

Someone asked this before and it wasn't answered in any of the 14 pages, so I'll try it again.

Is there a way to make it so that the popup only displays once ever for a user, or is this already possible?

If they close the announcement and log back in next time, does the same popup still display for them? If so, is there a way to prevent that from happening?

Thanks!
-V

sv1cec 09-23-2004 04:01 AM

Quote:

Originally Posted by vissa
Someone asked this before and it wasn't answered in any of the 14 pages, so I'll try it again.

Is there a way to make it so that the popup only displays once ever for a user, or is this already possible?

If they close the announcement and log back in next time, does the same popup still display for them? If so, is there a way to prevent that from happening?

Thanks!
-V

Yes, the pop-up keeps coming up again and again, every time they log in. I wish someone could make a "check box" to remove it, but it's not easy. Some sort of indexing between that particular announcement and each user should exist. As far as I know the announcements are not indexed in any way, so I am not sure we will ever see such an improvement.

I have to assume, a different method has to be used to create and store the annoucements.

Rgds
--------
John

fiber1 09-23-2004 05:02 AM

Not going to happen with this script, It just was not designed for that.

Would be nice though!

Fiber


All times are GMT. The time now is 08:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01663 seconds
  • Memory Usage 1,855KB
  • 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
  • (1)bbcode_html_printable
  • (14)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