vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)

Lynne 03-27-2008 11:43 PM

Quote:

Originally Posted by dismas (Post 1476315)
I keep running into parse errors for some reason. I don't know why though since I've used this writeup before to add pages to another of my forums. On this other forum, I'm having issues. The forums are with different hosting companies. Would that make a difference?

The first error that I got said that there was a parse error due to an unexpected ~ on line 4. I took the tilde out and then it told me this:

Code:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/content/v/e/r/vermontoutdoor/html/forum/writeups.php on line 8
Line 8 is the last line here:

Code:

//+####################+DEFINE+IMPORTANT+CONSTANTS+#######################
define('NO_REGISTER_GLOBALS',+1);
define('THIS_SCRIPT',+'writeups');+//+change+this+depending+on+your+filename


Um....
define('THIS_SCRIPT',+'writeups');+//+change+this+depending+on+your+filename

You've got a + after the ; and before the // You can't do that. And I don't know about the + before 'writeups' either.

dismas 03-27-2008 11:59 PM

Actually, I have no idea where the + came from. I did a straight copy/paste and the + is not in there.

Lynne 03-28-2008 02:59 AM

Quote:

Originally Posted by dismas (Post 1476327)
Actually, I have no idea where the + came from. I did a straight copy/paste and the + is not in there.

What are you using to edit the page? You need to use something like bbedit/notepad not word. If you don't use a plain text editor, then it could be adding extra characters which would then cause the problems you are seeing.

dismas 03-28-2008 03:49 AM

Actually, it's funny that you say that since it is BBEdit that I used. I even tried copying and pasting the php from this thread into a text document in TextEdit and still, the same errors came up.

Lynne 03-28-2008 02:32 PM

Quote:

Originally Posted by dismas (Post 1476469)
Actually, it's funny that you say that since it is BBEdit that I used. I even tried copying and pasting the php from this thread into a text document in TextEdit and still, the same errors came up.

So you copy/pasted what was in the first post into a page and tried it on that site and you got the errors?

(Is this thread the best place to discuss this or would it be better off in it's own thread where more people can come and help?)

dismas 03-28-2008 03:52 PM

Nevermind... I don't know what I have set different but it's the version of BBEdit that is screwing this up somehow. (Although I'm not sure why I got the same results with TextEdit)

What I was doing last night was on my MacBook.

I just tried to create the custom page again on my G4 tower and it worked fine. The G4 has BBEdit version 7 on it while the MacBook as the updated ver. 8.

Well, it's either that or my FTP software is doing something funky... Both of the computers have the same version of that but maybe one is sending the file in a different manner...

Either way, this is my issue to fix... Sorry for wasting everyone's time.

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

Quote:

Originally Posted by VeoMorphine (Post 483072)

PHP Code:

<?php

require_once('./global.php');

if (
$_REQUEST[filename])
{
    if (
is_member_of($bbuserinfo6) OR is_member_of($bbuserinfo5) OR is_member_of($bbuserinfo7));
    {
        
header("Location: $_REQUEST[filename]");
    }
}

?>

that makes it so usergroup 6 5 and 7 can download that file.

Oh, one more question... Where would this code segment go? Would it just replace this part:
Code:

require_once('./global.php');

RetroDreams 03-30-2008 12:28 AM

How do you adapt this article to add queries and pull data from the database? Is there an additional article out there? I've searched but came up empty.

Opserty 03-30-2008 11:46 AM

Quote:

Originally Posted by RetroDreams (Post 1478001)
How do you adapt this article to add queries and pull data from the database? Is there an additional article out there? I've searched but came up empty.

You just add the PHP you need to the PHP page...

RetroDreams 03-30-2008 04:54 PM

Yeah, I end up figuring it out with trial and error. My problem was I didn't realize you needed a separate template for looping but I got it squared away.

dfc005 04-02-2008 10:44 AM

So, I'm thinking of implementing this into my forum but I have a question, do you have to edit any vbulletin files to make this work? Or is it just templates and then creating my own php files?


All times are GMT. The time now is 03:30 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.02223 seconds
  • Memory Usage 1,751KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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