vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Dynamic Announcements: Programmable Forum Home Announcement/Message with conditionals (https://vborg.vbsupport.ru/showthread.php?t=97073)

bigmonay2k 10-14-2005 05:59 PM

not working for me damn

Logician 10-14-2005 06:30 PM

Quote:

Originally Posted by bigmonay2k
not working for me damn

What problem you have?

bigmonay2k 10-15-2005 07:24 PM

Quote:

Originally Posted by Logician
What problem you have?

Warning: Unknown(./includes/functions_dfha.php): failed to open stream: No such file or directory in /index.php(459) : eval()'d code on line 5

Fatal error: (null)(): Failed opening required './includes/functions_dfha.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dafirm2/public_html/forums/index.php(459) : eval()'d code on line 5

Logician 10-16-2005 06:04 AM

Quote:

Originally Posted by bigmonay2k
Warning: Unknown(./includes/functions_dfha.php): failed to open stream: No such file or directory in /index.php(459) : eval()'d code on line 5

Fatal error: (null)(): Failed opening required './includes/functions_dfha.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dafirm2/public_html/forums/index.php(459) : eval()'d code on line 5

Have you uploaded file "functions_dfha.php" into vb's /includes/ folder?

NexDog 10-16-2005 08:03 AM

Hi Logician,

I have had this hack working great on our VB2 board for two years but now we are finally upgrading to vb 3.5.0 and this hack is integral to our design. What we do is show a message on the left menu that either displays user info for members or a "Sign Up" messgae for visitors. See here - http://nexusportal.net.

I'm having trouble getting this to work in VB 3.5.0 though. We don't need the pop-up or separate table - we need to keep the current integration. Therefore your step 2 maybe shouldn't apply? In the forumhome template on vb2 I put:

<!-- Begin Conditional Hack-->
[[($bbuserinfo[userid]!=0)]]
Stuff here
[[/($bbuserinfo[userid]!=0)]]
[[($bbuserinfo[userid]==0)]]
Other stuff here
[[/($bbuserinfo[userid]==0)]]
<!-- /End Conditional Hack-->

I put $dfh_announcement in the forumhome template where I want the message to show and then put the code in the box in the vbulletin settings section which is:

Code:

<!-- Begin Conditional Hack-->
[[($bbuserinfo[userid]!=0)]]

                                  <td align="center"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>USER
                                    INFORMATION </strong></font></td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td width="185" height="100%" align="left" valign="top" background="nexica_01/main/sidebar_bg.jpg"><table width="162" border="0" cellpadding="1" cellspacing="1" valign="top">
                                <tr>
                                  <td height="3" valign="top"></td>
                                </tr>
                                <tr>
                                  <td valign="top"><smallfont>
                                    <p>
                                      <center>
                                        $avatarimage</a>
                                      </center>
                                      <br>
                                      $welcometext<strong><br>
                                      <br>
                                      Total Posts: <font color="#3A3D65">$bbuserinfo[posts]</font><br>
<b>Credits:</b> <font color="#3A3D65">$storepoints</font>
                                      <br>

                                     
<br>
                                      You Last Visited:</strong><br>
                                      $bbuserinfo[lastvisitdate].<br>
                                      <br>
                                      <strong>Time Now:</strong> $timenow.<br>
<br>
                                      <img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      <a href="store.php?s=$session[sessionhash]&action=main">Your Store</a><br>                                     
<br>
                                      <img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      $newposts<br><br>                         
</smallfont>
</p></td>
                                </tr>
                                <tr id="cat">
                                  <td height="19" align="center" background="nexica_01/main/side_title.gif"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>PRIVATE
                                    MESSAGES </strong></font></td>
                                </tr>
                                <tr>
                                  <td valign="top"><p><smallfont> <b>$bbuserinfo[username]</b>
                                      - You have <b>$newpm[messages]</b> new message(s)
                                      since your last visit.<br>
                                      <b>Unread Messages:</b> $unreadpm[messages]
                                      <br>
                                      <b>Total Messages:</b> $allpm[messages]<br>
                                      <br>
                                      <font face="verdana,arial,helvetica" size="1"><img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      </font><a href="private.php?s=$session[sessionhash]">Open
                                      Your PM Inbox</a><br>
                                      <br>
                                      </smallfont></p></td>
                                </tr>
                                [[/($bbuserinfo[userid]!=0)]] [[($bbuserinfo[userid]==0)]]
                                  <td align="center"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>THE
                                    NEXUSPORTAL! </strong></font></td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td width="185" height="100%" align="left" valign="top" background="nexica_01/main/sidebar_bg.jpg"><table width="162" border="0" cellpadding="1" cellspacing="1" valign="top">
                                <tr>
                                  <td valign="top"><smallfont> <p> <strong>Welcome
                                      to NexusPortal!</strong> This site is open
                                      to all current and prospective Nexus members.
                                      Take full advantage of this site! Register
                                      now to gain:<br>
                                      <br>
                                      <b><img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Full Posting Privileges.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
                                      <img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Access to all areas.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
                                      <img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Community Support.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
                                      <img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Ability to Interact.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"></b></p>
                                    <p align="center"><img src="nexica_01/customicons/arrow01.gif" width="9" height="9">&nbsp;<img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      <a href="register.php?s=$session[sessionhash]&action=signup"><strong>REGISTER
                                      NOW!</strong></a> <img src="nexica_01/customicons/arrow02.gif" width="9" height="9">&nbsp;<img src="nexica_01/customicons/arrow02.gif" width="9" height="9"></p>
                                    <p>$newposts<br>
                                      <br>
                                    </p></td>
                                </tr>
                                [[/($bbuserinfo[userid]==0)]]
                                <!-- /End Conditional Hack-->

This is one of our testbeds:

http://test.nexusportal.net/index.php?styleid=4

You can see the USER INFORMATION on the top of the left menu but after that it's all a mess. Can you not put HTML in there?

The vb2 version was so simple. :D

Logician 10-16-2005 08:11 AM

Quote:

Originally Posted by NexDog
Hi Logician,

I have had this hack working great on our VB2 board for two years but now we are finally upgrading to vb 3.5.0 and this hack is integral to our design. What we do is show a message on the left menu that either displays user info for members or a "Sign Up" messgae for visitors. See here - http://nexusportal.net.

I'm having trouble getting this to work in VB 3.5.0 though. We don't need the pop-up or separate table - we need to keep the current integration. Therefore your step 2 maybe shouldn't apply? In the forumhome template on vb2 I put:

<!-- Begin Conditional Hack-->
[[($bbuserinfo[userid]!=0)]]
Stuff here
[[/($bbuserinfo[userid]!=0)]]
[[($bbuserinfo[userid]==0)]]
Other stuff here
[[/($bbuserinfo[userid]==0)]]
<!-- /End Conditional Hack-->

I put $dfh_announcement in the forumhome template where I want the message to show and then put the code in the box in the vbulletin settings section which is:

Code:

<!-- Begin Conditional Hack-->
[[($bbuserinfo[userid]!=0)]]

                                  <td align="center"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>USER
                                    INFORMATION </strong></font></td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td width="185" height="100%" align="left" valign="top" background="nexica_01/main/sidebar_bg.jpg"><table width="162" border="0" cellpadding="1" cellspacing="1" valign="top">
                                <tr>
                                  <td height="3" valign="top"></td>
                                </tr>
                                <tr>
                                  <td valign="top"><smallfont>
                                    <p>
                                      <center>
                                        $avatarimage</a>
                                      </center>
                                      <br>
                                      $welcometext<strong><br>
                                      <br>
                                      Total Posts: <font color="#3A3D65">$bbuserinfo[posts]</font><br>
<b>Credits:</b> <font color="#3A3D65">$storepoints</font>
                                      <br>

                                     
<br>
                                      You Last Visited:</strong><br>
                                      $bbuserinfo[lastvisitdate].<br>
                                      <br>
                                      <strong>Time Now:</strong> $timenow.<br>
<br>
                                      <img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      <a href="store.php?s=$session[sessionhash]&action=main">Your Store</a><br>                                     
<br>
                                      <img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      $newposts<br><br>                         
</smallfont>
</p></td>
                                </tr>
                                <tr id="cat">
                                  <td height="19" align="center" background="nexica_01/main/side_title.gif"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>PRIVATE
                                    MESSAGES </strong></font></td>
                                </tr>
                                <tr>
                                  <td valign="top"><p><smallfont> <b>$bbuserinfo[username]</b>
                                      - You have <b>$newpm[messages]</b> new message(s)
                                      since your last visit.<br>
                                      <b>Unread Messages:</b> $unreadpm[messages]
                                      <br>
                                      <b>Total Messages:</b> $allpm[messages]<br>
                                      <br>
                                      <font face="verdana,arial,helvetica" size="1"><img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      </font><a href="private.php?s=$session[sessionhash]">Open
                                      Your PM Inbox</a><br>
                                      <br>
                                      </smallfont></p></td>
                                </tr>
                                [[/($bbuserinfo[userid]!=0)]] [[($bbuserinfo[userid]==0)]]
                                  <td align="center"><font color="#3A3D65" size="1" face="verdana,arial,helvetica"><strong>THE
                                    NEXUSPORTAL! </strong></font></td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td width="185" height="100%" align="left" valign="top" background="nexica_01/main/sidebar_bg.jpg"><table width="162" border="0" cellpadding="1" cellspacing="1" valign="top">
                                <tr>
                                  <td valign="top"><smallfont> <p> <strong>Welcome
                                      to NexusPortal!</strong> This site is open
                                      to all current and prospective Nexus members.
                                      Take full advantage of this site! Register
                                      now to gain:<br>
                                      <br>
                                      <b><img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Full Posting Privileges.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
                                      <img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Access to all areas.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
                                      <img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Community Support.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"><br>
                                      <img src="nexica_01/customicons/bullet02.gif" width="6" height="6">
                                      Ability to Interact.<img src="nexica_01/customicons/menuspacer.gif" width="1" height="15"></b></p>
                                    <p align="center"><img src="nexica_01/customicons/arrow01.gif" width="9" height="9">&nbsp;<img src="nexica_01/customicons/arrow01.gif" width="9" height="9">
                                      <a href="register.php?s=$session[sessionhash]&action=signup"><strong>REGISTER
                                      NOW!</strong></a> <img src="nexica_01/customicons/arrow02.gif" width="9" height="9">&nbsp;<img src="nexica_01/customicons/arrow02.gif" width="9" height="9"></p>
                                    <p>$newposts<br>
                                      <br>
                                    </p></td>
                                </tr>
                                [[/($bbuserinfo[userid]==0)]]
                                <!-- /End Conditional Hack-->

This is one of our testbeds:

http://test.nexusportal.net/index.php?styleid=4

You can see the USER INFORMATION on the top of the left menu but after that it's all a mess. Can you not put HTML in there?

The vb2 version was so simple. :D

I think you confuse this hack with my vb2 template conditionals hack.

This hack is for putting an announcement to forum home (with conditionals if you like) and the other hack was to use conditionals in any vb template you like.

If you need to put a fixed conditional to your forumhome template, you don't need this hack, you can use built-in conditionals of vb3.x: (In other words my vb2 template conditionals hack is now a built-in feature in vb 3.0.x and above)

IE.
<if condition = "$bbuserinfo[userid]>0">
Stuff to display to members
</if>
<if condition = "$bbuserinfo[userid]==0">
Stuff to display to guests
</if>

NexDog 10-16-2005 12:06 PM

Ah, thanks for that. I knew vb2 really well but I've been out of it for so long. VB 3.5.0 might as well be phpbb2 for all I know now.

Where is the best place to find out about this new in-built conditional functionality? And also I need to work out the new variables for $avatarimage, $welcometext, $newposts and others. Any insight would be helpful and sorry to take the thread of course a bit. :)

NexDog 10-16-2005 12:33 PM

I'm getting there slowly. :D

q8-star 10-16-2005 03:30 PM

Hi I've done all the steps ,but ,I got this error when home page is loaded :
Fatal error: Call to undefined function: dynamic_a() in C:\Inetpub\vhosts\arabic-av.com\httpdocs\forum\index.php(459) : eval()'d code on line 158

And yes,I have done everything including uploading,modifying ...etc . :)

Logician 10-16-2005 05:48 PM

Quote:

Originally Posted by q8-star
Hi I've done all the steps ,but ,I got this error when home page is loaded :
Fatal error: Call to undefined function: dynamic_a() in C:\Inetpub\vhosts\arabic-av.com\httpdocs\forum\index.php(459) : eval()'d code on line 158

And yes,I have done everything including uploading,modifying ...etc . :)

Uninstall that product and use that one. I think this should help.

womansnet 10-16-2005 05:55 PM

Any way of getting this to work on all pages rather than just the home page?

Logician 10-16-2005 06:06 PM

Quote:

Originally Posted by womansnet
Any way of getting this to work on all pages rather than just the home page?

https://vborg.vbsupport.ru/showpost....16&postcount=7

womansnet 10-16-2005 06:12 PM

Thank you. I am disappointed but hey, you can't always get what you want.

q8-star 10-16-2005 07:51 PM

Quote:

Originally Posted by Logician
Uninstall that product and use that one. I think this should help.

No ,didn't work .problem still there .
Fatal error: Call to undefined function: dynamic_a() in C:\Inetpub\vhosts\arabic-av.com\httpdocs\forum\index.php(459) : eval()'d code on line 158

:disappointed:

Logician 10-16-2005 08:35 PM

Quote:

Originally Posted by q8-star
No ,didn't work .problem still there .
Fatal error: Call to undefined function: dynamic_a() in C:\Inetpub\vhosts\arabic-av.com\httpdocs\forum\index.php(459) : eval()'d code on line 158

:disappointed:

I really believe you do something wrong (especially related to step 1) but if you are sure you do everything correctly, give me admin cp and FTP access to your board and let me check.

bang 10-16-2005 08:42 PM

what's been updated today?

bigmonay2k 10-17-2005 02:31 AM

Quote:

Originally Posted by Logician
Have you uploaded file "functions_dfha.php" into vb's /includes/ folder?

nevermind I got it, I think :squareeyed:

Avalon111 10-17-2005 06:41 AM

Quote:

Originally Posted by bang
what's been updated today?

good question!
changelog?

Logician 10-17-2005 07:40 AM

Quote:

Originally Posted by Avalon111
good question!
changelog?

If hack is working for you, nm

tqvn2004 10-17-2005 09:30 AM

Very nice hack! Keep up the good work, Logician :D

I have one request for modification: Is it possible to make the announcement appeared in all page, not just forum home page? I would like users to see announcement when they are viewing threads, for example.

Logician 10-17-2005 09:31 AM

Quote:

Originally Posted by tqvn2004
Very nice hack! Keep up the good work, Logician :D

I have one request for modification: Is it possible to make the announcement appeared in all page, not just forum home page? I would like users to see announcement when they are viewing threads, for example.

https://vborg.vbsupport.ru/showpost....9&postcount=92

eNforce 10-17-2005 11:33 PM

I don't get a popup in firefox 1.0.7 at all :(


Technically not a bad thing for the user, but as an admin I want users to see it if they are on firefox 1.0.7

Kran 10-18-2005 12:46 AM

I love it, I love it to death, thank you so much :D

funinthesun 10-18-2005 02:35 PM

*Installed* Can anyone tell me if it works ok on other browsers as I use IE.

Thanks :)

Bullethead21 10-18-2005 11:32 PM

Works great!! Nice Hack!! Installed has been "clicked"....:))

I use IE and it seems to work fine. The pop-up seems to "pop-up" within the VB window so IE settings dont affect it.

Oblivion Knight 10-19-2005 06:45 AM

It should be noted that this will add 2 additional queries to the forumhome if a condition is met by the user and an announcement is displayed. I've not tested this with the pop-up, but it is the case for the table..

I'm glad to see this one ported, very useful indeed! :)

funinthesun 10-19-2005 03:22 PM

To save me from reading through all the posts on this thread, can anyone tell me if there is a fix on this hack for firefox and netscape users as my members say that they are unable to close the pop up. Thank you :)

Logician 10-19-2005 03:25 PM

Quote:

Originally Posted by funinthesun
To save me from reading through all the posts on this thread, can anyone tell me if there is a fix on this hack for firefox and netscape users as my members say that they are unable to close the pop up. Thank you :)

I try it with Mozilla 1.7.8 and Firefox 1.0.6 and I can close the popup fine.

funinthesun 10-19-2005 03:29 PM

Weird, I tried it after some of my members said they couldn't close it and it won't close for me either? Very odd.

Logician 10-19-2005 04:01 PM

Quote:

Originally Posted by funinthesun
Weird, I tried it after some of my members said they couldn't close it and it won't close for me either? Very odd.

When did you install the hack? If you installed long ago, get the recent file in the first post. But if you installed in the last 2-3 days, this can't be the problem.

funinthesun 10-19-2005 04:37 PM

I installed 2 days ago. I've just checked again and it is now working fine. The only thing I have changed since I last checked it is removing the fish hack so I guess that was what was interfering with it. Sorry, about that :nervous:

q8-star 10-19-2005 08:50 PM

Quote:

Originally Posted by Logician
I really believe you do something wrong (especially related to step 1) but if you are sure you do everything correctly, give me admin cp and FTP access to your board and let me check.

Logician sorry for late reply :speechless: .Man .... you were absulutely right, I changed the ftp manager and the hack works absulutely fine ... :)

Thanks again for the great job ...

Mu5icMan 10-21-2005 09:28 AM

I have a problem when installing this product the database throws an error:

Warning: Unknown(): Unable to access /*****/includes/functions_dfha.php3 in /index.php3(459) : eval()'d code on line 5

Warning: Unknown(/******/includes/functions_dfha.php3): failed to open stream: Success in /index.php3(459) : eval()'d code on line 5

Fatal error: (null)(): Failed opening required '/******/includes/functions_dfha.php3' (include_path='.:/usr/share/pear') in /******/index.php3(459) : eval()'d code on line 5

According to the vb files there is no functions_dfha, so why is it looking for it?

Sorry dumb mistake forgot to add the file to includes folder :P

LJR 10-23-2005 08:14 AM

OMG! This enhancement is the absolute DOGZ DANGLY BITS!!!! Thank you for putting this together and imho this should be part of the core product.

A disable radio button would be nice, but it's easy enough to work around (as stated in numerous previous posts).

Thanks again!

Extreme John 10-25-2005 07:43 PM

Wow I love this!!

gigaenvy 10-25-2005 10:39 PM

Quote:

Originally Posted by Logician
It is mostly same but there a few improvements:

1- You can set up the frequency of popup announcement. Eg. you can make it popup in every 12 hours for the same user instead of every visit. (See admin cp screenshot above)

2- I get rid of the complainted "green" color Popup window and make it inherit your vb style with a cool red border.

3- It does not require any PHP hacking and can be installed through your admin cp as a pluggin.

4- Unlike vb3.x version, I don't support "header" version of it in which the announcement is displayed in all forum pages, not only forum home. It caused some minor bugs in post cached enabled forums so I only support forumhome announcement version which is stable

It would be nice to see random or rotating announcements in v3.5 and 3.0.x.

sensimilla 10-26-2005 11:30 AM

is it possible to make the announcement scroll (move) in the table ?

LJR 10-28-2005 07:35 AM

Can someone tell me what the variable name is to check a user's secondary usergroup id?

I have an awards night and want to put up an announcement only to those who nominated (known because they are part of a seconday usergroup). The $bbuserinfo[usergroupid] contains the user's primary group id.

TitanJeff 10-28-2005 03:07 PM

Love this hack but wanted to ask if the color red can be changed on the pop up. Also, I have a spacing issue with it on the front page with more space above it than below. I'd like it to be even if possible. http://www.gotitans.com/goForum/

Thanks for a great addition to my forum!

ILTK 10-28-2005 05:34 PM

INSTALLED, Very nice hack, I was using something hardcoded but this is sooo much nicer :)

Just one question, how would I go about using a conditional to not trigger it when a search engine spider drops by?

This would be great to avoid so you can write a long blurb about why people should register and not mess up onpage seo on forumhome.

Thanks!


All times are GMT. The time now is 05:36 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.02808 seconds
  • Memory Usage 1,929KB
  • 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
  • (2)bbcode_code_printable
  • (16)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