Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 4.0.x] add Tabs
    By: xhailuadox
  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » Support Center » vBulletin Support » 1 basic question....
Reply

 

  • Thread Tools
Old 05-22-2006, 06:14 PM   #1
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default 1 basic question....
ok so, some of you may have read my other post but i have now got it to work...

now i have a question because thgis is my first mod i am baically learning from thin air

i have the file in the home dir which does this:

PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// get special data templates from the datastore
$specialtemplates = array(
'maxloggedin',
);


// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(
DIR . '/includes/functions_online.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################


{
$vbulletin->maxloggedin['maxonline'] = 1002324;
build_datastore('maxloggedin', serialize($vbulletin->maxloggedin));
}
?>
that then sets the most ever logged in to to 1002324 but i am trying to make a mod which changes it to what you enter in a box here is the code for that page:

PHP Code:
<?php
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
@
set_time_limit(0);

// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('style');
$specialtemplates = array('products');

// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
require_once(
DIR . '/includes/adminfunctions_template.php');

print_cp_header();

print_table_start();
print_table_header("Max Users Online");

print_input_row('Desired Max Users Ever Online', 'inputname');
print_submit_row("Submit!", 0);



print_cp_footer();
?>
what i would like to know is what do i change to do that i know i have to merge the scripts but what do i put where to do that...? xD
vB Nova - Great vBulletin Help, Mods & Skins | PicoSphere - Free Image Hosting with No Pop-Ups
---------
Reply With Quote
Old 05-22-2006, 06:21 PM   #2
Psionic Vision
Coder

Psionic Vision's Avatar

Activity Longevity
0/20 16/20
Today Posts
0/3 ssssss115
Location: New York
Psionic Vision is on a distinguished road
Send a message via AIM to Psionic Vision
Status: Offline Default
PHP Code:
$vbulletin->input->clean_gpc('p', 'inputname', TYPE_UINT); 
Then access the variable using $vbulletin->GPC['inputname'];

So basically, you'd get this:
PHP Code:
<?php 
############################################################
error_reporting(E_ALL & ~E_NOTICE); 
@
set_time_limit(0); 

############################################################
$phrasegroups = array(); 
$specialtemplates = array(); 

############################################################
require_once('./global.php'); 

############################################################
print_cp_header(); 

if (
$getmaxonline = $vbulletin->input->clean_gpc('p', 'inputname', TYPE_UINT))
{
    
$vbulletin->maxloggedin['maxonline'] = $getmaxonline; 
    
build_datastore('maxloggedin', serialize($vbulletin->maxloggedin));
    echo 
'Saved!';
}

print_table_start(); 
print_table_header("Max Users Online"); 
print_input_row('Desired Max Users Ever Online', 'inputname'); 
print_submit_row("Submit!", 0); 

print_cp_footer(); 
?>
Note: I stripped the irrelevant junk from the code.

Last edited by Psionic Vision; 05-22-2006 at 06:28 PM.
Reply With Quote
Old 05-22-2006, 06:56 PM   #3
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
ok thanks so much man :D
Reply With Quote
Old 05-22-2006, 07:02 PM   #4
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
hmm slight problem it's not doing anything xD

ihave you changed the submit button becuase when i press that nothing happens.... :S
Reply With Quote
Old 05-22-2006, 07:05 PM   #5
Psionic Vision
Coder

Psionic Vision's Avatar

Activity Longevity
0/20 16/20
Today Posts
0/3 ssssss115
Location: New York
Psionic Vision is on a distinguished road
Send a message via AIM to Psionic Vision
Status: Offline Default
Put:

PHP Code:
print_form_header('yourfilename', ''); 
Before

PHP Code:
print_table_start(); 
Reply With Quote
Old 05-22-2006, 07:10 PM   #6
Nick R
vBulletin Guru

Nick R's Avatar

Activity Longevity
0/20 14/20
Today Posts
0/3 sssss4450
Location: Cyberspace, UK
Age: 30
Nick R is on a distinguished road
Send a message via MSN to Nick R Send a message via Yahoo to Nick R
Status: Offline Default
yup it works now thanks mate.
Reply With Quote

Reply

« problem with post moderation | No Question Is Too Dumb! »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hi + Question!! black_ps2 Introductions 7 06-17-2005 05:01 PM



All times are GMT. The time now is 10:47 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!