vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Can someone help me please? (https://vborg.vbsupport.ru/showthread.php?t=193067)

oldfashionedfam 10-08-2008 02:54 PM

Can someone help me please?
 
I am using the mod that creates another page within vbulletin, using the header and footer. Seen here: https://vborg.vbsupport.ru/showthrea...513#post791513

My question, does this work with the current version of vbulletin? And if so, I keep getting the 404 Error Page not found.

I don't understand why I keep getting this. I've created the rules.php in notepad, uploaded via FTP to the site directory, created the new template in admincp, and copied information given in that. But for some reason, every time I go to where the page SHOULD be, I get the 404 Error.

Thanks for any help, it is GREATLY appreciated!

noppid 10-08-2008 02:58 PM

That should work fine. Post your code.

oldfashionedfam 10-08-2008 03:10 PM

This is what I put in the .php file I created and uploaded. Now, this is also going into a sub-directory, so maybe I didn't put it in the right one? However, I've tried quite a few of them.

PHP Code:

<?php

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

// ##################### DEFINE IMPORTANT CONSTANTS #######################
// change the line below to the actual filename without ".php" extention.
// the reason for using actual filename without extention as a value of this constant is to ensure uniqueness of the value throughout every PHP file of any given vBulletin installation.

define('THIS_SCRIPT''rules1'); 

// #################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

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

// pre-cache templates used by all actions
$globaltemplates = array(
        
// change the lines below to the list of actual templates used in the script
        
'rules',
        
);

// pre-cache templates used by specific actions
$actiontemplates = array();

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

// #################### HARD CODE JAVASCRIPT PATHS ########################
$headinclude str_replace('clientscript'$vbulletin->options['bburl'] . '/clientscript'$headinclude);

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

$navbits = array(); 
// change the line below to contain whatever you want to show in the navbar (title of your custom page)
$navbits[$parent] = 'OFCF Rules';

$navbits construct_navbits($navbits);
eval(
'$navbar = "' fetch_template('navbar') . '";');

// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' fetch_template('rules') . '");');

?>


And here is the code that I placed in the template that I created in admincp.

PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle]</title>
</
head>
<
body>

$header
$navbar

<table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" 

align="center">
<
tr>
<
td class="tcat">OFCF Rules</td>
</
tr>
<
tr>
<
td class="alt1">Other Bluff...</td>
</
tr>
</
table


Thank you for your help! :)

noppid 10-08-2008 03:12 PM

That will basically put out a blank page so far. Ya need a footer. But cool.

Now, show me your forum path url and the url to where your script lives. Full urls please.

add at the end.
HTML Code:

$footer
</body>
</html>


oldfashionedfam 10-08-2008 03:22 PM

Noppid, sorry about not having the footer, etc. I actually do have that in place in the template, just when I copied it to place here, it didn't grab it. :) So it is currently there.

The url where the page SHOULD show up is http://www.oldfashionedfamilies.com/forums/rules.php

Does that look right? I'm a newbie, just so you know. I've had this site for 2 years, and done things up until this point. :)

Thanks again for helping!

noppid 10-08-2008 03:24 PM

Ok, so it's in the forums folder. But it's 404. You gotta straighten that out. IF it's there, try setting it to chmod 755.

oldfashionedfam 10-08-2008 03:26 PM

Ok, I'm a little confused. Where do I try setting it to chmod 755?

noppid 10-08-2008 03:30 PM

Quote:

Originally Posted by oldfashionedfam (Post 1640355)
Ok, I'm a little confused. Where do I try setting it to chmod 755?

In FTP right click on the file, assuming when you look in ftp the file rules.php is there in the forums folder, and select file attributes. See what it is and set it to 755.

oldfashionedfam 10-08-2008 03:34 PM

Ok, just so I'm correct before I do this, when I open up /public_html/forums rules1.php IS there. I right click on the file, go to properties (I use Core FTP Lite) and there is a VALUE there of 644. I change the 644 to 755, correct?

And thanks again.

--------------- Added [DATE]1223483813[/DATE] at [TIME]1223483813[/TIME] ---------------

I'm dumb......I just figured out why it isn't working right now. I named the file rules1.php and am looking for it at rules.php

I wonder why it didn't work before when I had it set at rules.php?

Goodness....:o

--------------- Added [DATE]1223483941[/DATE] at [TIME]1223483941[/TIME] ---------------

Hey, if you wouldn't mind, I have another question.

How would I make a link on the navbar in the forums main called Rules that would take me to this page I created?

noppid 10-08-2008 03:45 PM

hehe, I saw that 1 and laughed. Yeah, you had the file attributes idea correct. if the file works and 644, leave it alone. If not, reset it.

Code:


 In NAVBAR: (link in navbar)
       
Find:

<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>

Add BELOW:

        <td class="vbmenu_control"><a href="rules.php?$session[sessionurl]">$vbphrase[my_rules_phrase]</a></td>

Or you can load the template hook var in your php code and display it. That will require using a hook.


All times are GMT. The time now is 11:19 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.05766 seconds
  • Memory Usage 1,759KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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