Adding page within the SMF system?

Started by RaalF, June 10, 2008, 08:54:56 AM

Previous topic - Next topic

me1982

where can i find the function theme copyright?

Arantor

Subs.php. The one that has the big fat warning that says you can't modify it.

From the source...

Quote
	
// DO NOT MODIFY THIS FUNCTION.  DO NOT REMOVE YOUR COPYRIGHT.
	
// DOING SO VOIDS YOUR LICENSE AND IS ILLEGAL.

me1982

#62
But I'm allowed to remove the 'valid ...' message?

Arantor

Yes, because that's not in the copyright message, that's in the theme like I already said! Which means you need to answer my question as to which theme you're using...

me1982


Arantor

Attach the file here. It's likely there's something in it that is unexpected.

larryhyman

<?php
error_reporting
(E_ALL);
$ssi_theme 3;
$ssi_gzip false;
require(
'smforums/SSI.php');
$context['page_title_html_safe'] = 'Welcome to Larry Hyman Computer Services';
template_header();
?>


my html content


<?php
template_footer
();
?>



This is the code I used to make my new home page and it works

Thanks
In god we trust, all others pay cash !

http://hyman.sytes.net

Rune-X

i have used this code on my page, it works fine expect for a little error on the page

<?php

require('SSI.php');

$context['page_title_html_safe'] = 'My new title';

template_header();
?>


<div>regular HTML here</div>

<?php
template_footer
();
?>


this is the error i got on top of every page i created and at the bottom everything else is fine

Warning: Invalid argument supplied for foreach() in /home/runex/public_html/Sources/Load.php(1733) : eval()'d code on line 408

mizwizzy

Is there any way to display the full menu bar rather than the "not logged in" version on the page, as this is all I seem to be able to view.   ???

Ice_Drake

Hi, I know that this topic was raised a long while back. Since my question involves directly with this topic, it seems right to continue the reply here.

Basically, I need an answer for below:

Quote from: seeker365 on December 25, 2009, 10:27:18 PM
Issue: how to make the theme work when putting the test php file outside 'smf' dir?


require_once( dirname(__FILE__) . '/smf/SSI.php');


and html output :


<link rel="stylesheet" type="text/css" href="http://192.168.1.2/Themes/default/css/index.css?rc2" />


this should be:

<link rel="stylesheet" type="text/css" href="http://192.168.1.2/smf/Themes/default/css/index.css?rc2" />


I am trying to integrate SMF to Coppermine Photo Gallery, PHPCatalog, and other simple PHP pages, so I want to have the header and the footer from SMF to be used on them; however, using the code specified in this topic raises the following error:

Fatal error: require_once() [function.require]: Failed opening required '/QueryString.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/etheria/public_html/temp/SMF/SSI.php on line 62

I figure that $sourcedir is undefined when the following line is executed:

require_once($sourcedir . '/QueryString.php');

What do I need to add or modify to get the following codes to work?

header.php

<?php
error_reporting
(E_ALL);

// Which Theme are we using?
$ssi_theme 1;
// Layers to be utilized
$ssi_layers = array('html''body');
// Change "true" to "false" to disable Gzip if not supported on your server
$ssi_gzip true;
//This is the SSI.php file in the Board dir.
require('../SSI.php');
?>



footer.php

<?php
//Let's murder SSI for now
ssi_shutdown();
//[n3rve] thinks this should do.
?>



Coppermine/themes/curve/theme.php

<?php
...
//Require header.php
require('../header.php'); 
...
//Require footer.php
require('../footer.php'); 
?>


#socialmedialikers#

How to create this referral button so that you can use it to refer someone to a forum and it automatically pulls the refer's member ID when refering?

So it will be like this : http://www.facebook.com/share.php?u=http://FORUM_DOMAIN_URL/index.php?action=refferals;refferedby=XXX [nofollow] ( XXX being refer's ID when logged in.

same as twitter etc

Code below:


<a href="http://www.facebook.com/share.php?u=http://FORUM_DOMAIN_URL/index.php?action=refferals;refferedby= [nofollow] ', $context['user']['id'] ,' " target="_blank" title="Share my unique referral link on Facebook">


Twitter
<a href="http://twitter.com/home?status=http://FORUM_DOMAIN_URL/index.php?action=refferals;refferedby= [nofollow] ', $context['user']['id'] ,' " target="_blank" title="Share my unique referral link on Twitter">


and this

<script src="http://cdn.socialtwist.com/2009100426595-1/script.js [nofollow]" type="text/javascript"></script>
<a class="st-taf" href="http://tellafriend.socialtwist.com:80 [nofollow]" onclick="return false;" style="border:0;padding:0;margin:0;"><img alt="SocialTwist Tell-a-Friend" style="position: absolute; left: 318px; top: 35px; border:0;padding:0;margin:0;" src="http://images.socialtwist.com/2009100426595-1/button.png [nofollow]" onmouseout="STTAFFUNC.hideHoverMap(this)" onmouseover="STTAFFUNC.showHoverMap(this, '2009100426595-1', 'http://FORUM_DOMAIN_URL/index.php?action=refferals;refferedby= ', $context['user']['id'] ,' 'Share my unique referral link.')" onclick="STTAFFUNC.cw(this, {id:'2009100426595-1', link: 'http://FORUM_DOMAIN_URL/index.php?action=refferals;refferedby= ', $context['user']['id']', title: 'Share my unique referral link.' });"></a>


Please help guys. Beer awaits who helps : Email me (nairabid(at)gmail.com

crimpson

Ok so everything's working fine for me here except for one question.
I added a page, called the header, footer, placed my php/html code in the middle, everything works.
I added a menu button on my main navigation bar that links to the new page.
When I'm on the new page I created, my button for "new page" doesn't turn active and instead the button for "home" stays active.
How do I make it so that when you navigate to the new page, it's corresponding menu button becomes active?
just point me in the right direction. thanks.

Kays

The page needs to be an action. (index.php?action=xxx)

If it is, then make sure that the action is the same as the first entry or the name of the button.

If it's not an action, then add the following before SSI.php is included.


$_GET['action'] = 'xxx';


Change the xxx to whatever name you used for the index of that button.

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

crimpson


Kays

Cool, I'm glad that you understood what to do. :)

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

Advertisement: