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)

T3MEDIA 12-19-2004 01:46 PM

Hey anyway to mod this to just make a user go thru web pages insted of pop ups?

like a NEW NEW just joined user could go thru stuff like would you like to subscribe to these things? or sign up for our job bank and there would be a table for that stuff... or intrested in our love connections? and there would be info for that.

conditional websites for vbulletin. so it turns this forum software into a server or some sort of a extent. :rolleyes:

T3MEDIA 12-19-2004 01:58 PM

Quote:

Originally Posted by Logician
Yes they are 3, not 4. I corrected the .txt file, thx for the heads up.

Is there a list of conditions for vb? just a table format?

T3MEDIA 12-24-2004 11:49 AM

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

T3MEDIA 12-24-2004 01:08 PM

Quote:

Originally Posted by docvader
I'm having trouble getting this to work. Shouldn't there be another "conditional" that defines what group your inquiring about? And, is that the way the field conditional should be worded?

Thanks! Love this hack.

I didnt try it but I thought the same thing. but. A guest wouldnt have a new field to fill out... so the other guys would. And there isnt a condition for certain groups when it comes to option boxes. They all get them.

Did I get that right guys?

T3MEDIA 12-24-2004 02:18 PM

Quote:

Originally Posted by Logician
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.)

ummm after my slew of posts... yeah this doesnt work. this is exactly what I need.

Logician 12-24-2004 03:40 PM

Quote:

Originally Posted by T3MEDIA
ummm after my slew of posts... yeah this doesnt work. this is exactly what I need.

You remember to:
a) change "x" with the profileid
b) Test it with a test user account (not admin account) who has this profile field empty.
right?

T3MEDIA 12-24-2004 10:38 PM

Quote:

Originally Posted by Logician
You remember to:
a) change "x" with the profileid
b) Test it with a test user account (not admin account) who has this profile field empty.
right?

give me some credit! You sound like my bank now! lol.
Yep. the Profileid was 16 on mine it is not a required field though. and there are about 6 check boxes in this field.

Logician 12-25-2004 07:23 AM

Quote:

Originally Posted by T3MEDIA
and there are about 6 check boxes in this field.

k this explains now. :) My code was for inputbox profile fields. I can't think of an easy way to do it for check box profile fields.

T3MEDIA 12-28-2004 12:15 AM

Oh man... no? darn... that is exactly what I wanted. man. But to be honest I made a new field called last name and that was field18 that didnt work either so I dont think this will work with that code bro. Here is what I go so far.

Quote:

[[($bbuserinfo[usergroupid]==3)]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because you have not yet confirmed your registration via the email we sent you. You will not be able to post or use other features of the site until you do. Please click the activation link in the email you were sent, or visit <a href="register.php?$session[sessionurl]do=requestemail">this page</a> to resend the activation email. If you did not receive the email then it's possible it was blocked by your email client. In this case you can either disable your blocker software or enter a new email address in <a href="profile.php?$session[sessionurl]do=editpassword">your profile</a> Thanks for coming by! This message will dissappear once you confirm your registration.[[/($bbuserinfo[usergroupid]==3)]]

[[(!$bbuserinfo[field16])]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because You haven't filled in new required locations in your profile yet! Please do so by clicking <a href="profile.php?$session[sessionurl]do=editprofile">here.</a> This message will dissappear once you complete this.[[/(!$bbuserinfo[field16])]]

[[($bbuserinfo[usergroupid]==2 AND $bbuserinfo[posts]==0)]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because You haven't posted on our forums. Please take the time and participate with others. You can start <a href="forum.php?">here</a>!
[[/($bbuserinfo[usergroupid]==2 AND $bbuserinfo[posts]==0)]]

[[($bbuserinfo[usergroupid]>1 AND $bbuserinfo[lastpost]<strtotime("-14 days"))]]IMPORTANT: READ THIS

Hello $bbuserinfo[username]! You are seeing this message because you have not posted a message in the last 2 weeks. Please take the time and participate with others. We would love to hear your opinions. You can start <a href="forum.php?">here</a>!
[[/($bbuserinfo[usergroupid]>1 AND $bbuserinfo[lastpost]<strtotime("-14 days"))]]

[[($bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $bbuserinfo[pmtotal]>65)]]
Attention: $bbuserinfo[username]! You have nearly reached your Private Messages limit of 70.

This counts for messages in your 'Inbox' and 'Sent Items' folder. Please delete unwanted messages, as once your limit is reached you will no longer be able to receive new Private Messages.
[[/($bbuserinfo[usergroupid]!=6 AND $bbuserinfo[usergroupid]!=5 AND $bbuserinfo[pmtotal]>65)]]

paulz 01-01-2005 02:16 AM

Quote:

Originally Posted by ixian
Aha!!! I have it working for vbadvanced! Now it shows up all throughout your site, assuming you are using it:)

Mini-mod for vba:

Install hack as normal, confirm it works.

Edit vbadvanced's index.php

Find:

PHP Code:

'bbcode_quote'
); 

Add under

PHP Code:

// Logician Hack: Dynamic Forum Announcements Hack
$globaltemplates[] = 'dfh_announcement';
$globaltemplates[] = 'dfh_announcement_headercode';
$globaltemplates[] = 'dfh_announcement_popup';
// Logician Hack: Dynamic Forum Announcements Hack 


Find

PHP Code:

######################### News ######################### 

Add ABOVE

PHP 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 

Now, edit your vbAdvanced INDEX template.

Find:

</head>

Add ABOVE

$dfh_announcement_headercode

Find:

$header
$navbar

CHANGE TO:

$dfh_announcement_popup
$header
$navbar
$dfh_announcement


Or put the two announcement bits wherever you want them to appear. Don't forget to do this for all your styles.

I may add this to the add-on hack section, but it's such a little mod - no code changes, just figuring out where the code goes in vba's scheme of things - it may not be worth the bother.

Enjoy, and thanks again Logician for a great hack!

prolly overlooking something dumb here, but my vba index.php file doesn't have any of that code you mentioned. we are talking vba cmps right? if so, what am i missing here?

my index.php code:

PHP Code:

<?php
// ++=========================================================================++
// || vBadvanced CMPS v1.0 RC2                                                ||
// || ? 2003-2004 vBadvanced.com & PlurPlanet, LLC - All Rights Reserved      ||
// || This file may not be redistributed in whole or significant part.        ||
// || http://vbadvanced.com                                                   ||
// ++ ========================================================================++

error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''adv_index');
define('VBA_PORTAL'true);

// ============================================
// Enter the full path to your forum here
// Example: /home/vbadvanced/public_html/forum
// ============================================

chdir('./forums');

// ============================================
// No Further Editing Necessary!
// ============================================

require_once('./global.php');

print_portal_output($home);

?>



All times are GMT. The time now is 09:13 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.01758 seconds
  • Memory Usage 1,780KB
  • 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
  • (5)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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