vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)

skylab 12-22-2009 04:32 PM

Getting a blank page. What are some things I can troubleshoot? The path is correct and the theme is correct and ive created the template in the right place.

ragtek 12-22-2009 04:46 PM

Post your current files

Bouncer222 12-27-2009 01:53 AM

I'm just wondering, is there any way to make pages for vb4 like you're able to make pages for 3.8.4 using vbadvanced? It was a lot more simpler than editing templates and instead using the BB code editor I believe that was how?

Lynne 12-27-2009 02:08 AM

Quote:

Originally Posted by Bouncer222 (Post 1939082)
I'm just wondering, is there any way to make pages for vb4 like you're able to make pages for 3.8.4 using vbadvanced? It was a lot more simpler than editing templates and instead using the BB code editor I believe that was how?

If you want to use vbadvanced, you may do so once they release a version of vbadvanced that works with vB4 (they may have done so already, I have no idea - check on their site).

tomsch 12-27-2009 03:08 PM

...

Lynne 12-27-2009 03:15 PM

Quote:

Originally Posted by tomsch (Post 1939471)
ok when i use the code in post one as-is i get a white page

is that what i should see??

i was expecting to see the vb header and footer etc..

this is the output of my test.php

Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>


That isn't even from this mod if everything is in capital letters since the example template I gave is all in small letters (and the html tag should be different). Did you put the template in the current style you are using?

tomsch 12-27-2009 03:36 PM

your to fast Lynne i removed to last post cause i finally saw my error.

i used lowercase test in my template and that was the result.

ARadarDetector 12-29-2009 06:09 AM

I did it and got this on a blank white page:, my website is: Radar-Detector.Net and I set my path to /home/matt/public_html/speed.php

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/matt/public_html/speed.php on line 2

Parse error: syntax error, unexpected T_STRING in /home/matt/public_html/speed.php on line 2

cellarius 12-29-2009 06:39 AM

Try reuploading the file, and make sure there are no characters before <?php.

stejoh 12-29-2009 12:12 PM

I have used this GREAT instructions to create a custom page.

I am aiming for a 2 or 3 column page but have not been able to sort out how to increase padding around the table cells.

My code looks like this:
PHP Code:

{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <
head>
    <
title>{vb:raw vboptions.bbtitle}</title>
    {
vb:raw headinclude}
  </
head>
  <
body>
    
    {
vb:raw header}
    
    {
vb:raw navbar}
    
    <
div id="pagetitle">
      <
h1>{vb:raw pagetitle}</h1>
    </
div>
    
    <
h2 class="blockhead">About 99nicu</h2>
    <
div class="blockbody">
      <
div class="blockrow">

<
table border="0" width="100%" cellpadding="25">
<
tr>

<
td width="33%" valign="top">
Lorem ipsum dolor sit ametconsectetur adipisicing elitsed do eiusmod tempor incididunt ut labore et dolore magna aliquaUt enim ad minim veniamquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariaturExcepteur sint occaecat cupidatat non proidentsunt in culpa qui officia deserunt mollit anim id est laborum.
</
td>

<
td width="33%" valign="top">
Lorem ipsum dolor sit ametconsectetur adipisicing elitsed do eiusmod tempor incididunt ut labore et dolore magna aliquaUt enim ad minim veniamquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariaturExcepteur sint occaecat cupidatat non proidentsunt in culpa qui officia deserunt mollit anim id est laborum.
</
td>


<
td width="33%" valign="top">
Lorem ipsum dolor sit ametconsectetur adipisicing elitsed do eiusmod tempor incididunt ut labore et dolore magna aliquaUt enim ad minim veniamquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequatDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariaturExcepteur sint occaecat cupidatat non proidentsunt in culpa qui officia deserunt mollit anim id est laborum.
</
td>

</
tr>
</
table>

      </
div>
    </
div>

     {
vb:raw footer}
 
 </
body>
</
html

Changing the "cellpadding"-value in <table> does not change cell padding.

Anyone here who have a clue which StyleVar to change?

Lynne 12-29-2009 02:23 PM

Quote:

Originally Posted by stejoh (Post 1941468)
Changing the "cellpadding"-value in <table> does not change cell padding.

Anyone here who have a clue which StyleVar to change?

If we had a link to the page, it would be much easier to see what is going on.

ARadarDetector 12-29-2009 02:58 PM

Quote:

Originally Posted by cellarius (Post 1941271)
Try reuploading the file, and make sure there are no characters before <?php.

there is no characters before it, my file is in the main root (i have vbulletin 4.0 with the new cms homepage) named "speed.php" and my template is called "TRAPS" my website url is: Radar-Detector.Net here is the file:

PHP Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT''/home/matt/public_html/speed.php');
define('CSRF_PROTECTION'true);  
// change this depending on your filename

// ################### 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('TRAPS',
);

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

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');

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

$navbits construct_navbits(array('' => 'Test Page'));
$navbar render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'SPEED TRAPS';

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######

$templater vB_Template::create('TRAPS');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());

?>


Lynne 12-29-2009 03:18 PM

Try changing this line:
PHP Code:

define('THIS_SCRIPT''/home/matt/public_html/speed.php'); 



to this:
PHP Code:

define('THIS_SCRIPT''speed'); 

Also, what editor are you using? Are you using a text editor and not something like Word?

ARadarDetector 12-29-2009 04:06 PM

changed that and still not working? I am using a text editor: wordpad

darsalles 12-29-2009 06:20 PM

I dont understand to much and im really interested on this :(

I created the test.php file with the first code, the file is on the forum root. Now on the part I have to create the TEST template with the code that shows there. How do I create that template D:???

ARadarDetector 12-29-2009 06:29 PM

Lynne thanks for the help!

For those that read my problem I was using "wordpad" instead of "notepad" and "wordpad" was adding a lot of random junk above the <php code....even though when I opened the file you couldnt see it....but was hiding it above it...fixed by saving to notepad then reuploading. Thanks Lynne!

Lynne 12-29-2009 07:08 PM

Quote:

Originally Posted by darsalles (Post 1941748)
I dont understand to much and im really interested on this :(

I created the test.php file with the first code, the file is on the forum root. Now on the part I have to create the TEST template with the code that shows there. How do I create that template D:???

Style Manager > find your style > Add New Template

(I always add it to my MASTER STYLE.)

darsalles 12-29-2009 10:39 PM

Quote:

Originally Posted by Lynne (Post 1941797)
Style Manager > find your style > Add New Template

(I always add it to my MASTER STYLE.)

Thanks now its working, i have another question xD... on the original thread u posted it shows how to add "Who is online" I want to add it on this one, but i coulnd't :(

Please modify the article and teach how to add that option :D

4ums 12-30-2009 03:01 AM

Hi lynne ive created a new tab for an arcade i want on my site i used ragteks mod create a new tab in the navbar https://vborg.vbsupport.ru/showthread.php?t=228313

So do i now have to use this mod for it to work i already have the flash game on my server.
but i also have to add some HTML..
<html>
<head>
<title>Pacman Advanced</title>
</head>
<body>
<center>
<h1>Pacman Advanced</h1>
<object classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="600" height="400">
<param name="movie" value="pacmanadv.swf">
<param name="quality" value="high">
<embed src="pacmanadv.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="600" height="400">
</embed>
</object>
<br>
<a href="http://www.startgames.ws">Online flash game</a>
</center>
</body>
</html>

for the game to work and not sure where to put either been trying 13 hours now and the whte flag is nearly up so any kinda help apprieciated thanks..

Lynne 12-30-2009 03:17 AM

Quote:

Originally Posted by 4ums (Post 1942124)
for the game to work and not sure where to put either been trying 13 hours now and the whte flag is nearly up so any kinda help apprieciated thanks..

If you need help with the modification, you need to ask in the modification thread. I have no idea what is needed for that modification to work.

4ums 12-30-2009 03:45 AM

Quote:

Originally Posted by Lynne (Post 1942133)
If you need help with the modification, you need to ask in the modification thread. I have no idea what is needed for that modification to work.

Thanks lynne but even if we forget my games mod i was asking do i need your mod here to create a page to work for the new tab i have created with ragteks mod thanks.

stejoh 12-30-2009 06:37 AM

Quote:

Originally Posted by Lynne (Post 1941551)
If we had a link to the page, it would be much easier to see what is going on.

Here's the page with the padding problem, i.e. which stylevar to change to add more padding around cells (since cellpadding="number" does not work.

http://99nicu.org/testforum/test.php

Lynne 12-30-2009 02:04 PM

Quote:

Originally Posted by 4ums (Post 1942145)
Thanks lynne but even if we forget my games mod i was asking do i need your mod here to create a page to work for the new tab i have created with ragteks mod thanks.

No, you may create a tab for an existing page or any condition your want (I have mine highlighting on my test site for a couple of the forums).

Quote:

Originally Posted by stejoh (Post 1942232)
Here's the page with the padding problem, i.e. which stylevar to change to add more padding around cells (since cellpadding="number" does not work.

http://99nicu.org/testforum/test.php

Try adding your padding inline:
HTML Code:

<td width="33%" valign="top" style="padding: 25px;">

stejoh 12-30-2009 02:11 PM

Quote:

Originally Posted by Lynne (Post 1942529)
Try adding your padding inline:
HTML Code:

<td width="33%" valign="top" style="padding: 25px;">

Thanks for your help! Works!

darsalles 12-30-2009 11:30 PM

Could someone help me adding columns at both side of the content, but with the same style of the content bar??

rEd86 12-31-2009 10:41 AM

Thanks for a great tutorial. I have some custom pages I am creating and it only took a few minutes to do so by following this example code.

I didn't see this mentioned in the thread but there is one slight problem with the code as it exists. (or at least there was when I implemented it on my site)

In the php code, you load the page title in to variable pagetitle but in the template you have vboptions.bbtitle so the title for the page shows up as forums.

I changed the line in the template from:
<title>{vb:raw vboptions.bbtitle}</title>
to
<title>{vb:raw pagetitle}</title>

and it worked as expected.

Take care!

--Ed

garretbyrne 12-31-2009 05:02 PM

Thanks Lynne it was extremely helpful and easy.. was able to create loads of pages in a matter of minutes... Cheers

mandingo 12-31-2009 10:29 PM

How would I add my forum's sidebar,getting kinda stuck,brain turning to spaghetti.
a nudge in the right direction may be all I need.

SuperGLS 01-01-2010 02:00 PM

Couple questions about this one.

When I try to add any HTML code underneath the ###Your Custom Code Goes Here### section I get this error.

Parse error: syntax error, unexpected '<' in /home/elantrax/public_html/forums/cotm.php on line 41

When I just add regular text underneath the ###Your Custom Code Goes Here### section it only displays the word "text" no matter what I have typed in.

Here's the URL. Everything else seems to be working fine.

http://www.elantraxd.com/forums/cotm.php

simon157 01-01-2010 02:49 PM

Hi, could someone please, please help me as I'm struggling adding code containing php code to my template. It's driving me nuts !! The code I want to add is the following so it loads within the forum environment, but I'm completely stuck...

PHP Code:

<?php require_once('Connections2/databasecon.php'); ?>
<?php
$maxRows_usersightings 
15;
$pageNum_usersightings 0;
if (isset(
$_GET['pageNum_usersightings'])) {
  
$pageNum_usersightings $_GET['pageNum_usersightings'];
}
$startRow_usersightings $pageNum_usersightings $maxRows_usersightings;

mysql_select_db($database_databasecon$databasecon);
$query_usersightings "SELECT * FROM sightings ORDER BY id DESC";
$query_limit_usersightings sprintf("%s LIMIT %d, %d"$query_usersightings$startRow_usersightings$maxRows_usersightings);
$usersightings mysql_query($query_limit_usersightings$databasecon) or die(mysql_error());
$row_usersightings mysql_fetch_assoc($usersightings);

if (isset(
$_GET['totalRows_usersightings'])) {
  
$totalRows_usersightings $_GET['totalRows_usersightings'];
} else {
  
$all_usersightings mysql_query($query_usersightings);
  
$totalRows_usersightings mysql_num_rows($all_usersightings);
}
$totalPages_usersightings ceil($totalRows_usersightings/$maxRows_usersightings)-1;
?>
<div id="container">
<div style="padding-left: 10px; padding-top:5px;">
  <a href="index.php?pageid=sightingssubmit.php"><strong>Submit a sighting </strong></a> | <a href="index.php?pageid=Sightings.php"><strong>Show all sightings   </strong></a>|                           <a href="index.php?pageid=Sightings.php&<?php printf("%spageNum_usersightings=%d%s"$currentPagemax(0$pageNum_usersightings 1), $queryString_usersightings); ?>">Previous</a> | <span class="style55"><a href="index.php?pageid=Sightings.php&<?php printf("%spageNum_usersightings=%d%s"$currentPagemin($totalPages_usersightings$pageNum_usersightings 1), $queryString_usersightings); ?>">Next</a>
              
              <span class="style55">              </div>
<br />
<table width="95%" border="0" align="center" bgcolor="#FCFCFC">
<tr>
               <td bgcolor="#848E7B"><div align="left" class="style1">No.</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Species</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Date</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Location</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Recorder</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Details</div></td>
    </tr>
             <?php do { ?>
               <tr>
                 <td width="30" valign="top" bgcolor="#FFFff4"><div align="left" class="style131 "> <?php echo $row_usersightings['id']; ?></div></td>
                 <td width="150" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['species']; ?></div></td>
                 <td width="50" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['date']; ?></div></td>
                 <td width="120" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['location']; ?></div></td>
                 <td width="100" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['recorder']; ?></div></td>
                 <td width="350" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['Notes']; ?></div></td>
             </tr>
               <?php } while ($row_usersightings mysql_fetch_assoc($usersightings)); ?>
    </table>
</div>

Hope you can help :(

Simon

Lynne 01-01-2010 03:02 PM

Quote:

Originally Posted by mandingo (Post 1943643)
How would I add my forum's sidebar,getting kinda stuck,brain turning to spaghetti.
a nudge in the right direction may be all I need.

I have no idea how to add sidebars. That is a template thing and you can probably find a tutorial or mod that will show you the code to add to your template to do that.

Quote:

Originally Posted by SuperGLS (Post 1943994)
Couple questions about this one.

When I try to add any HTML code underneath the ###Your Custom Code Goes Here### section I get this error.

Parse error: syntax error, unexpected '<' in /home/elantrax/public_html/forums/cotm.php on line 41

When I just add regular text underneath the ###Your Custom Code Goes Here### section it only displays the word "text" no matter what I have typed in.

Here's the URL. Everything else seems to be working fine.

http://www.elantraxd.com/forums/cotm.php

You don't just add text in a php file. You need to assign it to a variable and then out put the variable in the template. Or, just put the text in the template.
Quote:

Originally Posted by simon157 (Post 1944043)
Hi, could someone please, please help me as I'm struggling adding code containing php code to my template. It's driving me nuts !! The code I want to add is the following so it loads within the forum environment, but I'm completely stuck...

Hope you can help :(

Simon

You do not put php in templates. You put the php in the php page and then assign the output to a variable and put the variable in the template. Don't forget to register the variable for use in the template first.

simon157 01-01-2010 03:07 PM

Thanks Lynne, but could you possibly help me with the coding for the first one. Once I have an idea then I will be able to cover the rest of my pages. Sorry, if I'm asking to much, but I'm by no means a programmer and new to vbulletin. Thanks very much.

Simon

Lynne 01-01-2010 03:16 PM

You should post out in the main forums for help with converting your code for use in a page (that really isn't what this article is about and your stuff will get lost in here among other posts). You may also want to look at how vbulletin does it in their pages. You will probably want a second template for your while loop stuff also.

SuperGLS 01-01-2010 03:52 PM

I see. So can you give me an example of what type of "stuff" should go underneath the ###### YOUR CUSTOM CODE GOES HERE ##### part of the xxxxxx.php file that you've instructed us to make?

EDIT- I know this is newb question!

cellarius 01-02-2010 07:39 AM

Quote:

Originally Posted by SuperGLS (Post 1944093)
I see. So can you give me an example of what type of "stuff" should go underneath the ###### YOUR CUSTOM CODE GOES HERE ##### part of the xxxxxx.php file that you've instructed us to make?

EDIT- I know this is newb question!

There already is an example in the code given. Assigning a value to the variable $pagetitle, then registering $pagetitle for use in the template.

SuperGLS 01-02-2010 12:42 PM

Ohhh, I think I understand now, so...

PHP Code:

<?php

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

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT''test');
define('CSRF_PROTECTION'true);  
// change this depending on your filename

// ################### 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('TEST', <<<<Change this to the template name (case sensitive)
);

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

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');

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

$navbits construct_navbits(array('' => 'Test Page')); <<<<Change this to what you want to show in the navbar
$navbar 
render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'My Page Title'; <<<<<Make 'My Page Title' the name of the .php file that you want to display & do NOT add any other code (html/php/whateverto this area.

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######

$templater vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
print_output($templater->render());

?>

Make the template from the code in the first post, but don't change anything there, right?

Upload whatever .php file you want to call to the yoursite/forum/ folder.

So, does everything I've <<<<<'d next to and everything I've marked in red look ok? Thanks in advance!

simon157 01-02-2010 02:09 PM

Quote:

Originally Posted by Lynne (Post 1944065)
You should post out in the main forums for help with converting your code for use in a page (that really isn't what this article is about and your stuff will get lost in here among other posts). You may also want to look at how vbulletin does it in their pages. You will probably want a second template for your while loop stuff also.

I've posted my issue out in the forums as suggested but still no response. I've come to a complete stand still until I can get this sorted. Any chance of some help.

Thanks

Simon

cellarius 01-02-2010 02:20 PM

Quote:

Originally Posted by SuperGLS (Post 1944910)
Ohhh, I think I understand now, so...

Sorry to say: No, you don't...

Quote:

Make the template from the code in the first post, but don't change anything there, right?

Upload whatever .php file you want to call to the yoursite/forum/ folder.
Both is wrong. Of course you can change the template, that's what templates are for, and the only php file is the one where you put the php-code from firstpost. Where it says to put your custom code, you need to put your custom code.

Have you tried to get it running as is, i.e. exactly like explained in the article before making any changes?

What exactly are you trying to do anyway? What php-code do you want to execute?

simon157 01-02-2010 02:59 PM

Quote:

Originally Posted by cellarius (Post 1944971)
Sorry to say: No, you don't...


Both is wrong. Of course you can change the template, that's what templates are for, and the only php file is the one where you put the php-code from firstpost. Where it says to put your custom code, you need to put your custom code.

Have you tried to get it running as is, i.e. exactly like explained in the article before making any changes?

What exactly are you trying to do anyway? What php-code do you want to execute?

I have the same problem Cellarius. I'm trying to run the following code in a new template and I've completely stuck. Can you help at all?? I've tried everything, but I'm not a coder.

PHP Code:

<?php require_once('Connections2/databasecon.php'); ?>
<?php
$maxRows_usersightings 
15;
$pageNum_usersightings 0;
if (isset(
$_GET['pageNum_usersightings'])) {
  
$pageNum_usersightings $_GET['pageNum_usersightings'];
}
$startRow_usersightings $pageNum_usersightings $maxRows_usersightings;

mysql_select_db($database_databasecon$databasecon);
$query_usersightings "SELECT * FROM sightings ORDER BY id DESC";
$query_limit_usersightings sprintf("%s LIMIT %d, %d"$query_usersightings$startRow_usersightings$maxRows_usersightings);
$usersightings mysql_query($query_limit_usersightings$databasecon) or die(mysql_error());
$row_usersightings mysql_fetch_assoc($usersightings);

if (isset(
$_GET['totalRows_usersightings'])) {
  
$totalRows_usersightings $_GET['totalRows_usersightings'];
} else {
  
$all_usersightings mysql_query($query_usersightings);
  
$totalRows_usersightings mysql_num_rows($all_usersightings);
}
$totalPages_usersightings ceil($totalRows_usersightings/$maxRows_usersightings)-1;
?>
<div id="container">
<div style="padding-left: 10px; padding-top:5px;">
  <a href="index.php?pageid=sightingssubmit.php"><strong>Submit a sighting </strong></a> | <a href="index.php?pageid=Sightings.php"><strong>Show all sightings   </strong></a>|                           <a href="index.php?pageid=Sightings.php&<?php printf("%spageNum_usersightings=%d%s"$currentPagemax(0$pageNum_usersightings 1), $queryString_usersightings); ?>">Previous</a> | <span class="style55"><a href="index.php?pageid=Sightings.php&<?php printf("%spageNum_usersightings=%d%s"$currentPagemin($totalPages_usersightings$pageNum_usersightings 1), $queryString_usersightings); ?>">Next</a>
              
              <span class="style55">              </div>
<br />
<table width="95%" border="0" align="center" bgcolor="#FCFCFC">
<tr>
               <td bgcolor="#848E7B"><div align="left" class="style1">No.</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Species</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Date</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Location</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Recorder</div></td>
      <td bgcolor="#848E7B"><div align="left" class="style1">Details</div></td>
    </tr>
             <?php do { ?>
               <tr>
                 <td width="30" valign="top" bgcolor="#FFFff4"><div align="left" class="style131 "> <?php echo $row_usersightings['id']; ?></div></td>
                 <td width="150" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['species']; ?></div></td>
                 <td width="50" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['date']; ?></div></td>
                 <td width="120" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['location']; ?></div></td>
                 <td width="100" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['recorder']; ?></div></td>
                 <td width="350" valign="top" bgcolor="#FFFff4"><div align="left" class="style131"><?php echo $row_usersightings['Notes']; ?></div></td>
             </tr>
               <?php } while ($row_usersightings mysql_fetch_assoc($usersightings)); ?>
    </table>
</div>

Thanks Simon

SuperGLS 01-03-2010 01:04 AM

Quote:

Originally Posted by cellarius (Post 1944971)
Sorry to say: No, you don't...

Haha, ok, don't feel bad, can't hurt my feelings!
Quote:

Originally Posted by cellarius (Post 1944971)
Both is wrong. Of course you can change the template, that's what templates are for, and the only php file is the one where you put the php-code from firstpost. Where it says to put your custom code, you need to put your custom code.

Have you tried to get it running as is, i.e. exactly like explained in the article before making any changes?

What exactly are you trying to do anyway? What php-code do you want to execute?

I know you can change the template, but I don't need to change anything in it, right?

From what you are saying here I understand now I'm supposed to have just one template and one php file (the one included above that will include all of my custom code).

Right now I have it running exactly how it is. See here.

http://www.elantraxd.com/forums/cotm.php

The template works great and it seems ok, but whenever I try to add anything to the ###add your custom code### section of that PHP file I throw errors.

Maybe this isn't the right thing for me. I don't need to add php stuff I guess, just HTML code, but I figured that would still be possible. Guess not? If not that's ok too, I can jump on another solution. Basically I want it to look like this:

http://www.elantraxd.com/forums/misc...&template=cotm

I just found this HOW TO guide from Lynne after I used a different HOW TO guide to make that above. The reason I wanted to use this one from Lynne is because the URL would be a lot better.

So, am I out of luck or what? Thanks a great deal for any help!


All times are GMT. The time now is 12:27 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.04934 seconds
  • Memory Usage 1,992KB
  • 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
  • (2)bbcode_html_printable
  • (7)bbcode_php_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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