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.


All times are GMT. The time now is 08:10 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.01594 seconds
  • Memory Usage 1,843KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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