vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Banner Ads System (https://vborg.vbsupport.ru/showthread.php?t=104432)

Jack Crazy 11-17-2006 03:55 PM

I tried reinstalling, still NOTHING in ADMINCP. I read every post and page regarding this hack but admincp banner manager remains empty...

burntire 11-17-2006 04:34 PM

Quote:

Originally Posted by Jack Crazy (Post 1119387)
I tried reinstalling, still NOTHING in ADMINCP. I read every post and page regarding this hack but admincp banner manager remains empty...


Works for me are you using 3.6.3?

Jack Crazy 11-17-2006 06:28 PM

No, I am currently running vBulletin version 3.5.1

yup, still three black bars where the banner manager is... damnit

burntire 11-17-2006 07:00 PM

Quote:

Originally Posted by Jack Crazy (Post 1119492)
No, I am currently running vBulletin version 3.5.1


yup, still three black bars where the banner manager is... damnit


Upgrade that old software.

Jack Crazy 11-18-2006 07:14 PM

Is their something wrong in my banneradmin.php file?
PHP Code:

<?php

/*======================================================================*\
|| #################################################################### ||
|| # Banner System Lite v.1.0                                          # ||
|| # Author: Thinh Nguyen (tnguy3n)                                      # ||
|| # Support site: http://www.vbviet.com                              # ||
|| # Copyright ? 2005 vBviet Network. All Rights Reserved.               # ||
|| # This file may not be redistributed in whole or significant part  # ||
|| #################################################################### ||
\*======================================================================*/

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('GET_EDIT_TEMPLATES'true);
define('THIS_SCRIPT''banneradmin');

require_once(
'./global.php');

// #################### Start main script ####################

if (empty($_REQUEST['do']))
{
    
$_REQUEST['do'] = 'settings';
}

if(
$_REQUEST['do'] == 'settings'){

    
header("Location: options.php?do=options&dogroup=bannersys");
}

// Banner Manager
if($_REQUEST['do'] == "manage")
{
    
print_cp_header("Banner System Manager");
    
print_table_start();
    
print_table_header("Banner Manager"4);
    
print_form_header('banneradmin','addbanner');
    
$banners $db->query_read("SELECT * FROM " TABLE_PREFIX "bannersys_banners ORDER BY bannerid ASC");
    
print_cells_row(array('Banner''Dimension''Status','Options'), 1111'tcat');
    while(
$banner $db->fetch_array($banners))
    {
        
$bannerid $banner['bannerid'];

        if(
$banner['status'] == '0')
        {
            
$status '<font color="red">Inactive</font>';
            
$linkopt "<a href=\"banneradmin.php?do=activate&bannerid=$bannerid\">Activate</a>";
        }
        elseif(
$banner['status'] == '1')
        {
            
$status '<font color="green">Active</font>';
            
$linkopt "<a href=\"banneradmin.php?do=deactivate&bannerid=$bannerid\">Deactivate</a>";
        }
        elseif(
$banner['status'] == '2'
        { 
            
$status '<font color="yellow">Unapproved</font>'
            
$linkopt "<a href=\"banneradmin.php?do=approve&bannerid=$bannerid\">Approve</a>";
        }

        
$cell = array();
        
$cell[] = "<div align='center'>$banner[bannername]<br />$banner[bannerdesc] <br /><a href=\"$banner[bannerurl]\" title=\"$banner[bannername]\" target=\"_blank\"><img src=\"$banner[imgurl]\" alt=\"$banner[bannername]\" borde=\"0\"></a></div>";
        
$cell[] = $banner['bwidth'] . ' x ' $banner['bheight'];
        
$cell[] = $status;
        
$cell[] = "<div align='center'><a href=\"banneradmin.php?do=modify&bannerid=$bannerid\">Modify</a> | <a href=\"banneradmin.php?do=delete&bannerid=$bannerid\" onClick=\"return confirm('Delete it?')\">Delete</a><br />$linkopt</div>";
        
print_cells_row($cell);
    }
    
print_submit_row('Add New Banner'04);
    
print_table_footer();
    
print_cp_footer();
    exit;
}
if(
$_REQUEST['do']=="addbanner"){
    
print_cp_header("Add New Banner");
    
print_table_start();
    
print_table_header("Add Banner");
    
print_form_header('banneradmin','insertbanner');
    
print_input_row("Banner Name:<dfn>Your banner name.</dfn>"'bannername');
    
print_input_row("Description:<dfn>Short description for the banner.</dfn>"'bannerdesc');
    
print_input_row("Banner Link:<dfn>Home link of the banner. Must start with http://www..</dfn>"'bannerurl');
    
print_input_row("Image Location:<dfn>Location of banner image. Must start with http://www.</dfn>"'imgurl');
    
print_input_row("Banner Width:<dfn></dfn>"'bwidth');
    
print_input_row("Banner Height:<dfn></dfn>"'bheight');
    
print_yes_no_row("Active?:<dfn>Is it active?</dfn>"'status');
    
print_submit_row('Add Banner'0);
    
print_table_footer();
    
print_cp_footer();
    exit;
}

if(
$_POST['do'] == 'insertbanner')
{
    
$vbulletin->input->clean_array_gpc('p', array('bannername' => TYPE_STR'bannerdesc' => TYPE_STR'bannerurl' => TYPE_STR'imgurl' => TYPE_STR'bwidth' => TYPE_INT'bheight' => TYPE_INT'status' => TYPE_INT));

    
$db->query_write("
        INSERT INTO " 
TABLE_PREFIX "bannersys_banners(bannername, bannerdesc, bannerurl, imgurl, bwidth, bheight, status) 
        VALUES('" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[bannername])) . "', 
            '" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[bannerdesc])) . "', 
            '" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[bannerurl])) . "', 
            '" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[imgurl])) . "', 
            '" 
intval($vbulletin->GPC[bwidth]) . "', 
            '" 
intval($vbulletin->GPC[bheight]) . "',
            '" 
intval($vbulletin->GPC[status]) . "')
        "
);
    
define('CP_REDIRECT'"banneradmin.php?do=manage");
    
print_stop_message('banner_added_successfully');
    exit;
}

if(
$_REQUEST['do']=="modify")
{
    
$vbulletin->input->clean_array_gpc('r', array('bannerid' => TYPE_INT));

    
$banner$db->query_first("SELECT * FROM " TABLE_PREFIX "bannersys_banners WHERE bannerid = '" $vbulletin->GPC['bannerid'] . "'");
    
print_cp_header("Modify Banner");
    
print_table_start();
    
print_table_header("Modify Banner: $banner[bannername]");
    
print_form_header('banneradmin','update');
    
construct_hidden_code('bannerid'$banner['bannerid']);
    
print_input_row("Banner Name:<dfn>Your banner name.</dfn>"'bannername'$banner['bannername']);
    
print_input_row("Description:<dfn>Short description for the banner.</dfn>"'bannerdesc'$banner['bannerdesc']);
    
print_input_row("Banner Link:<dfn>Home link of the banner. Must start with http://www..</dfn>"'bannerurl'$banner['bannerurl']);
    
print_input_row("Image Location:<dfn>Location of banner image. Must start with http://www.</dfn>"'imgurl'$banner['imgurl']);
    
print_input_row("Banner Width:<dfn></dfn>"'bwidth'$banner['bwidth']);
    
print_input_row("Banner Height:<dfn></dfn>"'bheight'$banner['bheight']);
    
print_yes_no_row("Active?:<dfn>Is it active?</dfn>"'status'$banner['status']);
    
print_submit_row($vbphrase['update']);
    
print_table_footer();
    
print_cp_footer();
    exit;
}

if(
$_POST['do'] == 'update')
{
    
$vbulletin->input->clean_array_gpc('p', array(
                            
'bannerid'            => TYPE_INT,
                            
'bannername'        => TYPE_STR,
                            
'bannerdesc'        => TYPE_STR,
                            
'bannerurl'            => TYPE_STR,
                            
'imgurl'            => TYPE_STR,
                            
'bwidth'            => TYPE_INT,
                            
'bheight'            => TYPE_INT,
                            
'status'            => TYPE_INT
                        
));

    
$db->query_write("UPDATE " TABLE_PREFIX "bannersys_banners
        SET bannername = '" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[bannername])) . "',
            bannerdesc = '" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[bannerdesc])) . "',
            bannerurl = '" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[bannerurl])) . "',
            imgurl = '" 
addslashes(htmlspecialchars_uni($vbulletin->GPC[imgurl])) . "',    
            bwidth = '" 
intval($vbulletin->GPC[bwidth]) . "',
            bheight = '" 
intval($vbulletin->GPC[bheight]) . "',    
            status = '" 
intval($vbulletin->GPC[status]) . "'    
        WHERE bannerid = '" 
intval($vbulletin->GPC[bannerid]) . "'
        "
);
    
define('CP_REDIRECT'"banneradmin.php?do=manage");
    
print_stop_message('updated_banner_successfully');
    exit;
}

if (
$_REQUEST['do'] == 'delete')
{
    
$vbulletin->input->clean_array_gpc('r', array('bannerid' => TYPE_INT));
    
$db->query_write("
        DELETE FROM " 
TABLE_PREFIX "bannersys_banners 
        WHERE bannerid = '" 
intval($vbulletin->GPC[bannerid]) . "'
    "
);
    
define('CP_REDIRECT'"banneradmin.php?do=manage");
    
print_stop_message('deleted_banner_successfully');
    exit;
}

if (
$_REQUEST['do'] == 'activate')
{
    
$vbulletin->input->clean_array_gpc('r', array('bannerid' => TYPE_INT));
    
$db->query_write("
        UPDATE " 
TABLE_PREFIX "bannersys_banners SET status = '1'
        WHERE bannerid = '" 
intval($vbulletin->GPC[bannerid]) . "'
    "
);
    
define('CP_REDIRECT'"banneradmin.php?do=manage");
    
print_stop_message('activated_banner_successfully');
    exit;
}

if (
$_REQUEST['do'] == 'deactivate')
{
    
$vbulletin->input->clean_array_gpc('r', array('bannerid' => TYPE_INT));
    
$db->query_write("
        UPDATE " 
TABLE_PREFIX "bannersys_banners SET status = '0'
        WHERE bannerid = '" 
intval($vbulletin->GPC[bannerid]) . "'
    "
);
    
define('CP_REDIRECT'"banneradmin.php?do=manage");
    
print_stop_message('deactivated_banner_successfully');
    exit;
}


// banner stats
if($_REQUEST['do'] == 'stats')
{
    
print_cp_header("Banner Stats Manager");
    
print_table_start();
    
print_table_header("Banner Stats"4);
    
print_cells_row(array('Banners''Total Hits''Status','Option'), 1111'tcat');

    
$getstats $db->query_read("SELECT banners.bannerid, banners.bannername, banners.bannerurl, banners.status, stats.*, COUNT(stats.bannerid) AS totalhits
        FROM " 
TABLE_PREFIX "bannersys_stats AS stats
        LEFT JOIN " 
TABLE_PREFIX "bannersys_banners AS banners ON (banners.bannerid = stats.bannerid)
        GROUP BY stats.bannerid
        ORDER BY totalhits DESC    
    "
);
    while(
$stats $db->fetch_array($getstats))
    {
        if(
$stats['status'] == '0')
        {
            
$status '<font color="red">Inactive</font>';
        }
        elseif(
$stats['status'] == '1')
        {
            
$status '<font color="green">Active</font>';
        }
        elseif(
$stats['status'] == '2'
        { 
            
$status '<font color="yellow">Unapproved</font>'
        }
        
        
// print results
        
$cell = array();
        
$cell[] = "<a href=\"$stats[bannerurl]\" target=\"_blank\">" $stats['bannername'] . '</a>';
        
$cell[] = $stats['totalhits'];
        
$cell[] = $status;
        
$cell[] = "<div align='center'><a href=\"banneradmin.php?do=viewstats&bannerid=$stats[bannerid]\">View Detail</a></div>";
        
print_cells_row($cell);
    }
    
print_table_footer();
    
print_cp_footer();
}


// view banner stats
if($_REQUEST['do'] == 'viewstats')
{
    
$bannerid $vbulletin->input->clean_gpc('r''bannerid'TYPE_INT);

    
print_cp_header("Banner Stats Manager");
    
print_table_start();
    
print_table_header("Detail Stats"3);
    
print_cells_row(array('User''Visit Date''User IP'), 111'tcat');

    
$getstats $db->query_read("SELECT stats.*, banner.bannerid, user.userid, user.username
        FROM " 
TABLE_PREFIX "bannersys_stats AS stats
        LEFT JOIN " 
TABLE_PREFIX "bannersys_banners AS banner ON (banner.bannerid = stats.bannerid)
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = stats.visitorid)
        WHERE stats.bannerid = '
$bannerid'
        ORDER BY stats.visitdate DESC    
    "
);
    while(
$stats $db->fetch_array($getstats))
    {
        
$stats['visitdate'] = vbdate($vbulletin->options['dateformat'], $stats['visitdate']);

        if(
$stats['userid'])
        {
            
$user "<a href=\"../member.php?u=$stats[userid]\">" $stats['username'] . '</a>';
        }
        else
        {
            
$user 'Guest';
        }

        
// print results
        
$cell = array();
        
$cell[] = $user;
        
$cell[] = $stats['visitdate'];
        
$cell[] = $stats['visitorip'];
        
print_cells_row($cell);
    }
    
print_table_footer();
    
print_cp_footer();
}


?>


Jack Crazy 11-18-2006 07:21 PM

and this is what I see in ACP:
https://vborg.vbsupport.ru/external/2006/11/13.jpg

MotMann 11-26-2006 10:04 AM

How i can put in complet affilicodes?

MotMann 01-01-2007 10:00 PM

No answer here? :(

Puntoboy 03-16-2007 08:09 PM

Quote:

Originally Posted by Oap JTRipper (Post 1035986)
working fine for me

vb 3.6 rc2
vba 2.2

www.oapsquad.com/forums/

if your using custom themes have you done this
PHP Code:

Thishowevermay not be working with some custom skins if navbar template's codebit are changed. To fix that problem, open Banner System plugin (at global_start hook), replace the whole content with:

// Banner Ads System by tnguy3n
if($vbulletin->options['
bannersys_mode'])
{
    $getads = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "

bannersys_banners WHERE status = '
1' ORDER BY RAND() LIMIT 1");
    $ads = $vbulletin->db->fetch_array($getads);

    // print banner ads
    eval('
$bannerads "' . fetch_template('bannerads') . '";');

    $vbulletin->db->free_result($getads);
    unset($getads);



I have done this but the ads do not show...:down:

RichieBoy67 06-12-2007 07:32 PM

This has always worked for me..

Where is the download??? I understand you are selling a version now but to remove the older version and leave the whole thread is just not right....

I don't have a spare $20 right now and would like to download the one that was here... Does anyone have it?? Please??


All times are GMT. The time now is 08:24 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.02445 seconds
  • Memory Usage 1,906KB
  • 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_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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