News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Static Page Mod

Started by –Michael, May 20, 2005, 04:09:34 AM

Previous topic - Next topic

Valiantheart

Hi, does the static page only appears with such a long url? Is there a way to shorten it? Say, I have a page I want to call rules.html instead of that long name, is it possible?

Valiantheart

I find that a simple <title>Your title here</title> tag works fine. Include the tag in your Content, of each static page.

Another question. After I increased my number of static pages, I get three Static Page Mod Options. Did I do anything wrong here?

anunlike

Quote from: Valiantheart on December 19, 2005, 03:39:24 PMI find that a simple <title>Your title here</title> tag works fine. Include the tag in your Content, of each static page.

Another question. After I increased my number of static pages, I get three Static Page Mod Options. Did I do anything wrong here?
Thanks. Those tags don't seem to work for me when I put them in the content area, though, just like the regular <?php $context['page_title'] = ...>

Valiantheart

Quote from: anunlike on December 19, 2005, 05:20:25 PM
Quote from: Valiantheart on December 19, 2005, 03:39:24 PMI find that a simple <title>Your title here</title> tag works fine. Include the tag in your Content, of each static page.

Another question. After I increased my number of static pages, I get three Static Page Mod Options. Did I do anything wrong here?
Thanks. Those tags don't seem to work for me when I put them in the content area, though, just like the regular <?php $context['page_title'] = ...>

Try puting it as the first line? Before anything else in your page or maybe let us have a look at the page so we could help?

Ray™

#104
How to make this show up in static mode -- i can get it to work using iframes but not without.. And I know im not putting in the right code :'(

here is the code that works with Iframes
<iframe src="http://www.rranderson.com/dvd/gallery"
height="1000px" width="100%" Scrolling="yes"></iframe>


Any idea how to make it work with out the iframes??

Fixed i used this
<iframe src="http://www.rranderson.com/dvd/gallery"
height="2000px" width="100%" marginwidth=0 marginheight=0 frameborder=0 Scrolling="no"></iframe>

arcade-Only (over 800 Games)
http://www.arcade-only.com
Hand Made Ceramics
http://cbr.rranderson.com

dbrown

#105
Since I installed this mod to incorporate a FAQ, it worked fine. However, now if I click on the XHTML or CSS validator links at the forum footer, I get all sorts of errors. Namely,


Target: http://forums.cvhspreps.com/index.php
Please, validate your XML document first!
Line 104

Column 48

The reference to entity "staticpage" must end with the ';' delimiter.


Anyone know what the deal with this is?

Thanks

**Follow up question, will this work with 1.1.RC2? Looking at the install page, it fails at ./Sources/ModSettings.php
Please do not PM me with support questions.  You will get better and faster responses by contacting someone who has a clue. Thank you.

dbrown

Please do not PM me with support questions.  You will get better and faster responses by contacting someone who has a clue. Thank you.

Ray™

Quote**Follow up question, will this work with 1.1.RC2? Looking at the install page, it fails at ./Sources/ModSettings.php

I tried to install it manually but the code was way off -- so I haven't got it working yet
arcade-Only (over 800 Games)
http://www.arcade-only.com
Hand Made Ceramics
http://cbr.rranderson.com

dbrown

Quote from: Ray on December 31, 2005, 07:21:56 PM
Quote**Follow up question, will this work with 1.1.RC2? Looking at the install page, it fails at ./Sources/ModSettings.php

I tried to install it manually but the code was way off -- so I haven't got it working yet

Same here. The upgrade was still worth it, but I'd really like to get this working, as I'm sure all of you would, too. I have my FAQ and a Donations page linked from the static pages.....glad I thought about it beforehand, and remembered to save the code!!
Please do not PM me with support questions.  You will get better and faster responses by contacting someone who has a clue. Thank you.

bbear

The good news: I have all 25 of my existing static pages working now by adding this code to (main directory)/index.php:

/ *********** Begin: Static Page ***********
'static' => array('_StaticPageMod.php', 'DisplayStaticPage'),
// *********** End: Static Page ***********

Add it after the line that says
Quote'stats' => array('Stats.php', 'DisplayStats'),

Also add the required code to languages/modifications.english

The bad news:
any modifications to existing static pages, and adding of new static pages has to be done directly in the settings table in the MYSQLdatabase (use phpmyadmin, etc).  I couldn't figure out how to add the code to the admin area in sources.modsettings.php in RC2
hxxp:community.tuliptools.com/index.php [nonactive]

dbrown

It shows the guy who developed this hasn't been online since November.....hmmmm. I hope he'll update this for RC2 - It's a great MOD.
Please do not PM me with support questions.  You will get better and faster responses by contacting someone who has a clue. Thank you.

Teknomancer

I tried installing it manually on RC2 but the code was just too complex in ModSettings.php.... That was the file that failed.

I'm waiting for someone to do this for RC2 and release it as an easy package.

Also did NO ONE but me get BLANK (no text) in the Admin panel for this static page mod??? I had to manually modify some file to get the Text showing in the Admin panel for this mod...
My SMF Forum:

dbrown

I was having the same trouble with ModSettings. I'm in your boat - waiting for someone to release a package for RC2. I hope someone is better at it than I am. StaticPage is a much needed mod. I'm surprised the SM hasn't implemented it in to the core package.
Please do not PM me with support questions.  You will get better and faster responses by contacting someone who has a clue. Thank you.

mitchell784

Quote from: dbrown on January 05, 2006, 12:52:02 AM
I was having the same trouble with ModSettings. I'm in your boat - waiting for someone to release a package for RC2. I hope someone is better at it than I am. StaticPage is a much needed mod. I'm surprised the SM hasn't implemented it in to the core package.


I am waiting too!
A question that sometimes drives me hazy: am I or are the others crazy?

~Albert Einstein

Crip

Can / Would any of the other mod makers update this mod for RC2 .. dang I had important stuff in some Static pages?

Later, Crip~
I have become comfortably numb!


I remember my mother's prayers and they have always followed me.
   - Abraham Lincoln -



TOTM Winner. | Demo Site1on1 Theme Support

dbrown

I ended up having to do it THIS way. You have to add the content manually, but it works pretty good. Also, you may want to see THIS post on editing the core NDT in RC2 (If it applies to you). I don't think anyone's ressurecting the Static Mod Theme, sadly.
Please do not PM me with support questions.  You will get better and faster responses by contacting someone who has a clue. Thank you.

Delbert

Quote from: Valiantheart on December 20, 2005, 12:24:52 AM
Quote from: anunlike on December 19, 2005, 05:20:25 PM
Quote from: Valiantheart on December 19, 2005, 03:39:24 PMI find that a simple <title>Your title here</title> tag works fine. Include the tag in your Content, of each static page.

Another question. After I increased my number of static pages, I get three Static Page Mod Options. Did I do anything wrong here?
Thanks. Those tags don't seem to work for me when I put them in the content area, though, just like the regular <?php $context['page_title'] = ...>

Try puting it as the first line? Before anything else in your page or maybe let us have a look at the page so we could help?

I've tried everything above without satisfactory results.  The <title> tag works, but not in all browsers.  I've done something else with which I am more pleased.

I added code like the following to my "_StaticPageMod.php" file in my "Sources" directory:

global $context;

if ($_REQUEST['staticpage'] == '1') {
$context['page_title'] = 'One!';
} else if ($_REQUEST['staticpage'] == '2') {
$context['page_title'] = 'Two!';
   } else {
$context['page_title'] = 'Three!';
              }


I just placed it in the "DisplayStaticPage()" function at its beginning.  Here is what the entire function looks like after adding the above code:

function DisplayStaticPage() {
global $context;

if ($_REQUEST['staticpage'] == '1') {
$context['page_title'] = 'One!';
} else if ($_REQUEST['staticpage'] == '2') {
$context['page_title'] = 'Two!';
   } else {
$context['page_title'] = 'Three!';
              }

loadTemplate('_StaticPageMod');
}


Of course, this is an example.  You would want to change "One!", "Two!", and "Three!" to the actual titles of your pages.  And you could add more compound IF/ELSE statements for additional pages.
Delbert

Blessed is the man who, having nothing to say, abstains from giving us worthy evidence of the fact.
George Eliot (1819 - 1880)

John

if i wanna link to another static page then i get the forum index page, so thats something different. :-[
i tried everything but cant get it fixed, can you help me?


Elen

I would love to see this mod working with RC2, it's just what i need for my site.

Delayed

I think that this is exactly what I need anyone updating this Mod?

Thanks

Advertisement: