Link to Mod (http://mods.simplemachines.org/index.php?mod=130)
Purpose:
Adding up to 10 static pages within SMF. For details, see Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130)
Yeah, I think this can come in handy for making a "board rules" page or something.
Great work ;).
For Russian and French users: open the ZIP file with 7zip, then EDIT the staticpagemod.xml file:
after this: <file name="$languagedir/Modifications.german.php">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$txt['staticpage_Title'] = 'Static Page Mod - Optionen';
$txt['staticpage_Content1'] = 'Inhalt fьr Seite 1<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content2'] = 'Inhalt fьr Seite 2<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content3'] = 'Inhalt fьr Seite 3<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content4'] = 'Inhalt fьr Seite 4<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content5'] = 'Inhalt fьr Seite 5<div class="smalltext">(HTML ist erlaubt)</div>';
]]></add>
</operation>
</file>
add this (copy/paste ;) ):
<file name="$languagedir/Modifications.french.php">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$txt['staticpage_Title'] = 'Static Page Mod - Options';
$txt['staticpage_Content1'] = 'Contenu de la page #1<div class="smalltext">(HTML est permis)</div>';
$txt['staticpage_Content2'] = 'Contenu de la page #2<div class="smalltext">(HTML est permis)</div>';
$txt['staticpage_Content3'] = 'Contenu de la page #3<div class="smalltext">(HTML est permis)</div>';
$txt['staticpage_Content4'] = 'Contenu de la page #4<div class="smalltext">(HTML est permis)</div>';
$txt['staticpage_Content5'] = 'Contenu de la page #5<div class="smalltext">(HTML est permis)</div>';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.russian.php">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$txt['staticpage_Title'] = 'Static Page Mod - Опции';
$txt['staticpage_Content1'] = 'Содержание страницы #1<div class="smalltext">(тэги HTML разрешены)</div>';
$txt['staticpage_Content2'] = 'Содержание страницы #2<div class="smalltext">(тэги HTML разрешены)</div>';
$txt['staticpage_Content3'] = 'Содержание страницы #3<div class="smalltext">(тэги HTML разрешены)</div>';
$txt['staticpage_Content4'] = 'Содержание страницы #4<div class="smalltext">(тэги HTML разрешены)</div>';
$txt['staticpage_Content5'] = 'Содержание страницы #5<div class="smalltext">(тэги HTML разрешены)</div>';
]]></add>
</operation>
</file>
( I translate MODs I use, I always forget this may come in handy to other people...)
Nice mod.
I could see it coming in handy for making a page in the forum with information like forun rules or anything really. Nice job.
Thx. It works fine for me. ---> Impressum (http://www.neworder.1nd.de/forum/index.php?action=static&staticpage=1)
Nice to see that you like this mod, guys :)
@SaniOKh:
Quote from: SaniOKh on May 20, 2005, 02:11:40 PM
For Russian and French users
I only can see something French here, but no Russian ;)
I am going to add additional languages to future versions of this mod.
Please just let me know your translations.
Michael
When i go to forum features to add HTML i dont see the text boxes to add the HTML :-s
Ignore that, i should learn to read :-)
I've received an e-mail in German, where it is asked
how to use more than 5 static pages with this mod.
1. File 'staticpagemod.xml'Search for:
$txt['staticpage_Content5'] = 'Page content #5<div class="smalltext">(HTML is allowed)</div>';
Add after:
$txt['staticpage_Content6'] = 'Page content #6<div class="smalltext">(HTML is allowed)</div>';
$txt['staticpage_Content7'] = 'Page content #7<div class="smalltext">(HTML is allowed)</div>';
$txt['staticpage_Content8'] = 'Page content #8<div class="smalltext">(HTML is allowed)</div>';
$txt['staticpage_Content9'] = 'Page content #9<div class="smalltext">(HTML is allowed)</div>';
$txt['staticpage_Content10'] = 'Page content #10<div class="smalltext">(HTML is allowed)</div>';
Search for:
$txt['staticpage_Content5'] = 'Inhalt für Seite 5<div class="smalltext">(HTML ist erlaubt)</div>';
Add after:
$txt['staticpage_Content6'] = 'Inhalt für Seite 6<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content7'] = 'Inhalt für Seite 7<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content8'] = 'Inhalt für Seite 8<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content9'] = 'Inhalt für Seite 9<div class="smalltext">(HTML ist erlaubt)</div>';
$txt['staticpage_Content10'] = 'Inhalt für Seite 10<div class="smalltext">(HTML ist erlaubt)</div>';
Search for:
array('textarea', 'staticpage_Content5', array('6', '50')),
Add after:
Quote
array('rule'),
array('textarea', 'staticpage_Content6', array('6', '50')),
array('rule'),
array('textarea', 'staticpage_Content7', array('6', '50')),
array('rule'),
array('textarea', 'staticpage_Content8', array('6', '50')),
array('rule'),
array('textarea', 'staticpage_Content9', array('6', '50')),
array('rule'),
array('textarea', 'staticpage_Content10', array('6', '50')),
2. File 'staticpagemod_mysqlsettings_add.php'Search for:
'staticpage_Content5' => '',
Add after:
'staticpage_Content6' => '',
'staticpage_Content7' => '',
'staticpage_Content8' => '',
'staticpage_Content9' => '',
'staticpage_Content10' => '',
2. File 'staticpagemod_mysqlsettings_remove.php'Search for:
'staticpage_Content5',
Add after:
'staticpage_Content6',
'staticpage_Content7',
'staticpage_Content8',
'staticpage_Content9',
'staticpage_Content10',
I am definitely missing something. Both mods installed fine. I can see the options, and I've edited/created/saved a static page that I want to use. Now comes the not-so-clear (to me) part.
You wrote:
To call your static pages, use the following URL format:
http://www.yoursite.com/forum/index.php?action=static&staticpage=X
These static pages are displayed in the main section of SMF -- between header and footer:[/i]
I'm not so sure I understand static page. Do they only work when you call them out from a browser address bar, or is there a file (or files) I can edit so that the static page(s) appear normally in a main forum page?
sdl,
I've used separate HTML pages to display static content such as forum rules, 'about this forum', etc. The main disadvantage of using separate HTML files for this purpose is, that these are not integrated in SMF.
Therefore I needed a solution, so contents like 'forum rules' should be displayed in SMF and not somewhere else. "In SMF" means, that the content should be displayed in the main section of SMF. For example, if you click on "Register", "Login" or "Search", a page comes up which is well integrated between header and footer. In a similar way I wanted to integrate my static pages.
This is what the Static Page Mod provides.
You edit your static pages in "Forum Configuration / Edit Features & Options / Static Page Mod Options. There you have 5 text boxes. You can enter / paste HTML there, this HTML is the content for your static pages.
It's recommended to provide a button, e.g. "Forum Rules". Add the URL " http://www.yoursite.com/forum/index.php?action=static&staticpage=1" in the anchor. When a user clicks the button, the static page #1 will be displayed. It just gets the HTML which you've entered in the Forum Config and renders the page to be displayed.
If you'd like to know details about how this is done, just take a look at the mod files or ask here.
Michael
Michael
Thanks for the mod - works great.
One question - if I want to increase the number of static pages after installing the mod, I can see the changes required to:
Sources/ModSettings.php
Themes/Default/Languages/Modifications.english.php
What else needs to be changed?
TIA
Great mod :). I'm using it on the chat page of my forums.
http://www.oi-forums.com/index.php?action=static&staticpage=1
Quote from: rvforumite on June 02, 2005, 08:21:00 AM
Michael
Thanks for the mod - works great.
One question - if I want to increase the number of static pages after installing the mod, I can see the changes required to:
Sources/ModSettings.php
Themes/Default/Languages/Modifications.english.php
What else needs to be changed?
TIA
I would also like to know this.
-Dan The Man
DUDE!
This is perfect, static pages is a must have for my websites. Thanx for helping my dreams come true.
Sincerly,
-Xarcell
I'm using the classic theme for my smf-site. I got the link to view my static pages, but how can I add it to my menu buttons at the top? When I just try to slide in html code link, I get a parse error. I know html/css, but I don't know any php.
Any suggestions?
-Xarcell
Xarcell
In Themes/Default/index.template.php:
After:
// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];
Insert (on new line):
// How about the [your_button] button?
echo '
<a href="http://www.yourforum.com/forum/index.php?action=static&staticpage=1">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/your_button.gif" alt="' . $txt[801] . '" style="margin: 2px 0;" border="0" />' : $txt[801]), '</a>', $context['menu_separator'];
Of course, the your_button.gif image needs to be in your Themes/Default/Images directory. You can create new SMF-style buttons here (http://www.yabb.nl/index.php?ind=buttongenerator).
How to increase the number of static pages *after* installing the mod:Possibility #1: Re-install Static Page Mod
- Go to "Forum Configuration / Edit Features & Options / Static Page Mod Options" and copy all your HTML sourcecode into a textfile - this is for backup purposes since these will be deleted in the following steps.
- Uninstall the static page mod
- Perform the changes on the Static Page Mod, see reply #6 in this thread
- Install the modified Static Page Mod
Possibility #2: Edit files directly without re-installYou need to modify the following files:
- $languagedir/Modifications.english.php
- $languagedir/Modifications.german.php (if applicable)
- $sourcedir/ModSettings.php
See reply #6 in this thread for details what needs to be added, in addition see staticpagemod.xml which comes with the mod.
In addition, you need to add values to the setting table in MySQL. To do this, modify the staticpagemod_mysqlsettings_add.php which comes with the mod and add
array('rule'),
array('textarea', 'staticpage_Content6', array('6', '50')),
(and so on...)
See reply #6 in this thread for details.
Then, copy the staticpagemod_mysqlsettings_add.php into the board dir and open the file with your browser, e.g. http://yoursite.com/smf/staticpagemod_mysqlsettings_add.php.
I suggest to use possibility #1, since the mod can be uninstalled more easy.
Thanks for your feedback so far.
I have received the following PM:
Quote
(...)
How about making a mod that shows newsfeed (using rss or whatever) displayed on a static page?
That would also be a must have if i was avialable. You could alter your static mod and use the smf rss system to make a new newsfeed mod.
Well, I think about the possibility to support – in addition to HTML – PHP code in the Static Page Mod options.
In this way, we would be very flexible and could also display stuff like rss or whatever.
Anyway, I am not going to add "special services" such like rss to this mod, but if PHP code can be used, everyone can use the power of it (and could for example use SSI (http://www.simplemachines.org/community/ssi_examples.shtml)).
Michael
Thanks Michael. I figured that option 1 would be the best choice.
Thanx, I got it to work! (the button that is)
Thanx again,
-Xarcell
I think option 1 would be better too. We could do more with it as far as other things go if the idea comes along.
-Xarcell
Just to let other people know, the Static Page Mod DOES NOT work with SMF 1.0.4.
-Dan The Man
Dan the man,
FYI the Static Page mod appears to work fine with 1.0.4 for me. The mod was installed with SMF 1.0.3 and I later upgraded to SMF 1.0.4 without changing or re-installing the mod.
Quote from: rvforumite on June 07, 2005, 07:47:45 PM
Dan the man,
FYI the Static Page mod appears to work fine with 1.0.4 for me. The mod was installed with SMF 1.0.3 and I later upgraded to SMF 1.0.4 without changing or re-installing the mod.
Hmm, it appears to be just the opposite for me. I click on the link to the static page and it brings me back to the board index.
-Dan The Man
Let's see if others report the same thing before one of us heads off on a witch hunt.
Quote from: rvforumite on June 07, 2005, 09:51:00 PM
Let's see if others report the same thing before one of us heads off on a witch hunt.
OK, sounds good.
-Dan The Man
Thanks for testing with 1.0.4.
I will investigate it ASAP and update the mod to 1.0.4 — if necessary.
Michael
Quote from: -Michael- on June 08, 2005, 04:56:44 PM
Thanks for testing with 1.0.4.
I will investigate it ASAP and update the mod to 1.0.4 — if necessary.
Michael
OK, thank you. It really is a great mod. It's good for people who aren't especially good with PHP to incorporate a completely customized HMTL page into their forums. Keep up the good work :).
-Dan The Man
New version of this mod is now available: Static Page Mod 1.1 (http://mods.simplemachines.org/index.php?mod=130)
Changes:
- Added: Functionality of mod "ModSettings Textarea Mod 1.0.3". So this Textarea mod is no more necessary and should be uninstalled if you install Static Page Mod 1.1.
- Added: French language
This mod works fine with SMF 1.0.4.
However, if you upgrade from SMF 1.0.3 to 1.0.4, I suggest:
- Go to "Forum Configuration / Edit Features & Options / Static Page Mod Options" and copy all your HTML sourcecode into a textfile - this is for backup purposes since these will be deleted during uninstallation
- Uninstall the Static Page Mod and the ModSettings Textarea Mod 1.0.3
- Apply the upgrade to SMF 1.0.4
- Install the Static Page Mod 1.1
Michael
FYI — Static Page Mod 1.1 does work with SMF 1.0.5.
As always: I suggest to save the html, uninstall the mod, apply the SMF update und re-install Static Page Mode.
I'm trying to include an 'if, echo' statement in one of my static pages but it appears they do not display PHP?
How would I go about, for instance, getting such simple code as
[if ($context['user']['is_guest'])
echo 'text';
to work on one of the static pages?
Just wanted to say, excellent mod, I am using it on my forums. :)
Thanks for your feedback.
@Harelin:
PHP is not yet supported, but I am going to implement this in a future release.
Michael
Any chance there's a quick fix or I could hard code it in through the actual files?
I'm using the static pages as a series of checks and verifications... first page informs the person, if they aren't registered, that they must register to proceed... second page informs them that they must have a minimum post count of 5 to proceed, etc... and putting an application form at the end.
Harelin, take a look at _StaticPageMod.template.php, there you could include your checks.
// Retrieve the HTML content to display. For $_REQUEST['staticpage'],
// a value between 1 and 5 is supported.
$local_settingvar = "staticpage_Content" . $_REQUEST['staticpage'];
$local_staticContent = $modSettings[$local_settingvar];
// Display the content
if (!empty($local_staticContent)) {
// The setting variable is not empty so we display the content
echo $local_staticContent;
}
Michael
New version of this mod is now available: Static Page Mod 1.2 (http://mods.simplemachines.org/index.php?mod=130)
- Added: PHP support for the static page content
- Added: title in the mod options for each page content
- Added: extended from 5 to 10 static pages
- Added: help is now available in the mod settings
Works with: SMF 1.04, 1.05
How to upgrade from a previous version: See Static Page Mod site (http://mods.simplemachines.org/index.php?mod=130), section "How to upgrade from a previous version".
Michael
Thanks Michael :)
With PHP enabled, I was able to throw this together:
http://www.evcitadel.com/ev/index.php?option=com_smf&Itemid=26&action=static&staticpage=1
New version of this mod is now available: Static Page Mod 1.3 (http://mods.simplemachines.org/index.php?mod=130)
- Updated for SMF 1.1 Beta 3 Public, and still works with SMF 1.0.4 and 1.0.5
How to upgrade from a previous version: See Static Page Mod site (http://mods.simplemachines.org/index.php?mod=130), section "How to upgrade from a previous version".
Michael,
I'm running SMF 1.0.5 and, when I try to download the new release of this mod through the Package Manager, I get this error message:
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.
Any ideas?
TIA
rvforumite,
I am working on this issue: http://www.simplemachines.org/community/index.php?topic=41012.0
Solution so far: You can download the staticpagemod1.3.zip manually and upload it through the Package Manager.
Michael
OK thanks for response Michael.
Michael
I saw [Unknown]'s response to your question in the other thread so I went ahead and uploaded the mod file using ftp. Looks like it installed just fine. Of course, the language errors were still there.
Meanwhile, since you were able to verify my prior observation, there remains an unanswered question, but that's for you to resolve.
Thanks again for help and thanks for a great mod..
Tom
Hi all,
package manager does not work in version 1.1
Can someone tell me where I should place these files and
do I need to do something special to install them?
thanks
@artful:
You can download the mod manually from the mod site (http://mods.simplemachines.org/index.php?mod=130) and then
- upload the staticpagemodx.x.zip via the package manager (Admin -> Main -> Packages -> Download Packages -> Upload a Package)
- *or* upload the staticpagemodx.x.zip via FTP into the packages directory (usually located at: yoursite.com/smf/Packages/)
After that, the package manager will list the mod (-> Browse Packages) and you can click 'Apply Mod' to install it.
Michael
I keep getting these errors when I try to apply a php include.
2: Unknown(cutenews/show_news.php): failed to open stream: No such file or directory
File: /home/*****/public_html/forum/Themes/default/_StaticPageMod.template.php (eval?)
Line: 4
Does the cutenews script have to be in the forum folder so that I can call it via include? i want to add a small blog using cutenews to the static page. ;D
BTW, this is what the include looks like. Im hoping someone can help me out. the NEWS folder is within the /forum folder too.
<?PHP
$number = "1";
$category = "1";
include("cutenews/show_news.php");
?>
try an absolut URL like "http://domain.com/x/x/cutenews/index.php" or try to slash to the right folder like:
"../cutenewsfolder/cutenews/index.php".
im not sure i understand.....isnt this basically doing this-
<?php
ob_start();
$ssi_theme = 1;
$ssi_layers = array('main');
require_once('SSI.php');
?>
Html Content
<?php
ssi_shutdown();
?>
but with a standard url? (like www.asite.com/thefile.php)
Quote from: tentronik on August 07, 2005, 06:38:51 PM
try an absolut URL like "http://domain.com/x/x/cutenews/index.php" or try to slash to the right folder like:
"../cutenewsfolder/cutenews/index.php".
I tried both, I was still getting the same error :-[
I want to increase the number of character of the static pages, because pages not accept an high number of the character. It' possible?
I stilll really would like to use includes from an outside script using the static mod if possible. Please advise! thanks. ;D
sorry I have yet another question. how can I use this mod to display a php page (blog whatever)? what do I have to type in the field so the php page will be displayed?
many thanks
Quote from: trenchteam on August 09, 2005, 05:21:13 AM
I stilll really would like to use includes from an outside script using the static mod if possible. Please advise! thanks. ;D
then do this
<?php
$ssi_theme = 1;
$ssi_layers = array('main');
require_once('SSI.php');
echo 'Hi!';
ssi_shutdown();
?>
Example of what i did
<?php
ob_start();
$ssi_theme = 9;
$ssi_layers = array('main');
require_once('SSI.php');
echo doUBBC(file_get_contents('agreement.txt'));
ssi_shutdown();
?>
Voila.
http://paintplayers.com/smfthemes/hi.php
SO how would I go about using this php code? This is the include provided to me from cutenews.
<?PHP
$number = "1";
$category = "1";
include("cutenews/show_news.php");
?>
I have 1.0.5. Which download do I use?
Mark
Ok, I figured out the download, but the read me could use a little clarification. I just need to know which files to upload via ftp and where they go and which file gets uploaded thru the package manager.
Mark
Quote from: trenchteam on August 11, 2005, 12:34:45 AM
SO how would I go about using this php code? This is the include provided to me from cutenews.
<?PHP
$number = "1";
$category = "1";
include("cutenews/show_news.php");
?>
Just insert it. You can remove the PHP tags, because it's already in PHP. Just put it where it says "echo 'Hi!';"
I would also like to know if this page mod works with Bloczone's portal and Helios Multi Theme?
Mark
Yes, it wirth with the theme because I just tried it earlier today. Don't know much about the portal, but I don't see why it wouldn't.
-Xarcell
Thanks for the info. Now, how do you install it?
Mark
Ok, I have it installed. Now, what do I do to get the pages to show. I have buttons ready.
Mark
Quote from: Tippmaster on August 17, 2005, 09:33:57 PM
Quote from: trenchteam on August 11, 2005, 12:34:45 AM
SO how would I go about using this php code? This is the include provided to me from cutenews.
<?PHP
$number = "1";
$category = "1";
include("cutenews/show_news.php");
?>
Just insert it. You can remove the PHP tags, because it's already in PHP. Just put it where it says "echo 'Hi!';"
I got this error from this.
2: file(./data/comments.txt): failed to open stream: No such file or directory
File: /home/*****/public_html/forum/cutenews/inc/functions.inc.php
Line: 229
Does the author of this mod ever visit here? I could use a tutorial on how to set up these pages.
Mark
Quote from: Mark_Breznay on August 19, 2005, 01:07:08 PM
Does the author of this mod ever visit here? I could use a tutorial on how to set up these pages.
Mark
Quote from: –Michael on May 20, 2005, 04:09:34 AM
... For details, see Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130)
I've already seen that, that's why I'm posting here. Not enough detailed information.. I like doing things right, the first time, so I'll wait for clarification.
Mark
All,
I was not here within the last few days. Many posts since my last visit, I try to answer to these now.
Quote from: trenchteam on August 07, 2005, 06:34:55 PM
2: Unknown(cutenews/show_news.php): failed to open stream: No such file or directory
File: /home/*****/public_html/forum/Themes/default/_StaticPageMod.template.php (eval?)
Line: 4
Does the cutenews script have to be in the forum folder so that I can call it via include? i want to add a small blog using cutenews to the static page. ;D
No, I just have tested the following:
Forum is installed on http://localhost/forum-105/
A php file is located at http://localhost/test01/
In a staticpagemod textarea, I have entered:
<?php
include("http://localhost/test01/test01.php");
?>
The content of test01.php:
<?php
echo "Hello World";
?>
It works fine for me, the file test01.php is included well.
I know it's a silly question, but did you check the error message "No such file or directory"? It does not state that a php file cannot be included, it simply tells that it could not find the file/dir....
Quote from: Mark_Breznay on August 17, 2005, 12:19:50 PM
I have 1.0.5. Which download do I use?
Mark
See Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130):
Quote
Latest Version: 1.3
Compatible With: 1.0.4, 1.0.5, 1.1 Beta 3 Public
As you can see, the current version of StaticPageMod is compatible with SMF 1.0.5.
Quote from: Mark_Breznay on August 18, 2005, 03:12:01 PM
I would also like to know if this page mod works with Bloczone's portal and Helios Multi Theme?
Currently, over 100 mods can be downloaded, and almost every day new mods or new mod versions are added.
It is
almost impossible for a mod author to check compatibilities with every mod.
I suggest to set up a testing environment, install your mods and then you can see if they are compatible
with each other or not. Of course, it would be helpful to let us know about the result.
Quote from: Mark_Breznay on August 18, 2005, 05:48:18 PM
Thanks for the info. Now, how do you install it?
Quote from: Mark_Breznay on August 19, 2005, 02:05:56 AM
Ok, I have it installed. Now, what do I do to get the pages to show. I have buttons ready.
See the mod site: Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130)
Please let me know which part of this site is not clear enough for setting up static pages.
Quote from: Mark_Breznay on August 19, 2005, 01:07:08 PM
Does the author of this mod ever visit here? I could use a tutorial on how to set up these pages.
For a 'tutorial', see the mod site: Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130)
Please let me know which part of this site is not clear enough.
I often visit the SMF site, however the last few days I did not. Many thanks for the support of the other members.
Quote from: Mark_Breznay on August 19, 2005, 01:51:22 PM
Not enough detailed information.. I like doing things right, the first time, so I'll wait for clarification.
Please see above. I need to know exactly what is not clear enough.
Thanks,
Michael
How do I get the page to display? Where do I insert code?
Mark
Both is explained at Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130).
In the meantime I doubt that my English is comprehensible, as English is not my native language and the same questions come up again and again...
Anyhow, see below:
Quote from: Mark_Breznay on August 19, 2005, 05:03:53 PM
How do I get the page to display?
Quoted from Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130):
QuoteTo call your static pages, use the following URL format:
http://www.yoursite.com/forum/index.php?action=static&staticpage=X
where the "X" at the end of this URL stands for 1,2,3,... — so this is the number of your static page.
Quote from: Mark_Breznay on August 19, 2005, 05:03:53 PM
Where do I insert code?
Quoted from Static Page Mod Site (http://mods.simplemachines.org/index.php?mod=130):
QuoteAfter installation, you will have a new section in Forum Configuration / Edit Features and Options called Static Page Mod Options.
There you can enter HTML code or PHP for up to 10 different static pages:
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.qforum.de%2F_community-contribution%2Fsmf%2Fstaticpagemod%2Fshot_config.gif&hash=2c73e5fd60846eaf1f9da4471c1f3bbd04df0a21)
http://www.yoursite.com/forum/index.php?action=static&staticpage=X
Where do you put that code?
Mark
Well, my crystal ball tells me that you would like to add an icon such like "search", "help" etc. ??? ???
If so, you need to modify index.template.php. This has been covered very very often here, oh well, please use the search.
Anyhow, the less information from you, the less we can help.
I very much want to add these pages, using buttons I have already created, downloaded and installed. Without detailed instructions on how to do this, how do you think anyone could? A "read me," with detailed instructions would be very helpful here and stop people like me from asking so many questions.
Mark
Mark, I did not cover that since the implemetation depends on the structure of your theme, etc. etc.
And not everybody wants to call a static page with a SMF menu button.
Some search results on this matter:
http://www.simplemachines.org/community/index.php?topic=22799.0
http://www.simplemachines.org/community/index.php?topic=35631.0
If the search can't help you, I suggest to post a new thread asking for how to implement a new menu button in SMF. Currently, your question has nothing specific to do with StaticPageMod as far as I can see. You just need to know how to add a button to SMF, and this was covered often here, so please feel free to use the search and/or post a new thread.
Ok I added the code, entered the url in the browser and found the word "Gallery" over on the left side, in the middle of the page. Although the coding worked, this isn't what I want, so, you are right, I'll post a new thread and see what I can find. If you look on http://www.sundayniagara.com/forum/portal.php , which is an XMB forum and you look at the header panel up top, I have added everything from "Links" to Web Services." with a custom page mod from XMB Xtreme. I would like to do better than that with SMF and be able to call the pages with buttons, just like the main menu. That is basically a copy & paste mod and add your own content, name the page and add a plug-in into config.php .
Mark
PS: I tried to find this mod on XMB Xtreme, but couldn't find it. If you'll give me your email address, I'll send it to you, as I have it on my desktop.
This doesn't work for me. What am I doing wrong?
Mark
// How about the [Gallery] button?
echo '
<a
href="http://www.audioartisan.com/smf/index.php?action=static&staticpage=1">',
($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' .
$context['user']['language'] . '/helios_Gallery.gif" alt="' . $txt[801] . '" style="margin: 2px 0;"
border="0" />' : $txt[801]), '</a>', $context['menu_separator'];
I've figured this one out too. It needs to work with my theme, whch is helios_multi_tp . Does anyone know how to do this?
Mark
Quote from: –Michael on August 19, 2005, 04:59:05 PM
All,
I was not here within the last few days. Many posts since my last visit, I try to answer to these now.
Quote from: trenchteam on August 07, 2005, 06:34:55 PM
2: Unknown(cutenews/show_news.php): failed to open stream: No such file or directory
File: /home/*****/public_html/forum/Themes/default/_StaticPageMod.template.php (eval?)
Line: 4
Does the cutenews script have to be in the forum folder so that I can call it via include? i want to add a small blog using cutenews to the static page. ;D
No, I just have tested the following:
Forum is installed on http://localhost/forum-105/
A php file is located at http://localhost/test01/
In a staticpagemod textarea, I have entered:
<?php
include("http://localhost/test01/test01.php");
?>
The content of test01.php:
<?php
echo "Hello World";
?>
It works fine for me, the file test01.php is included well.
I know it's a silly question, but did you check the error message "No such file or directory"? It does not state that a php file cannot be included, it simply tells that it could not find the file/dir....
My directory for the script is there. Its in root/forum/cutenews
Im using this code
<?php
$ssi_theme = 1;
$ssi_layers = array('main');
require_once('SSI.php');
$number = "1";
$category = "1";
include("cutenews/show_news.php");
ssi_shutdown();
?>
Anything Im doing wrong? Im also using a custom theme. you can see my site here.
http://www.shoyoroll.com
This what I am talking about from XMB Xtreme. This is one beautiful mod and it works perfectly every time. Would anyone like to tackle this project?
Mark
http://www.xmbxtreme.com/viewthread.php?tid=3230
I love the static page mod, but was still worndering how much better can we make it? Then I was struck with a really good idea, but I dunno how easy it would to make. In theory, it doesn't really seem that hard to make.
Here's the advancement idea:
-----------------------------------------------------------
1.) Allow user's to make thier own static page. They would be able to use this as a "homepage" or whatever reason.
2.) What a user can insert on the static page would be limited to smf membergroup permissions. User's in "membergroup A" can use php, advanced html, basic html, bb code, attachments, images etc. User's in "membergroup B" can only use basic html, insert images, or whatever.
3.) In the admin > features & options: you'll have a list of your smf membergroups. For each group you can check boxes to allow attachments, images, html, php, etc. Then still show all your boxes (10) for the for the site's custom pages.
4.) A user can edit thier static page from thier "modify: profile > forum & profile information" with the little box showing there. Thier static page can be viewed from a link listed in post author information, or profile view.
-------------------------------------------------------------------
What do ya think?
-Xarcell
My apologies for not responding sooner, the last days I was pretty busy.
@trenchteam:
Currently I do not know what is going wrong there, but I will look into it soon, if I find out more I will post it here.
@Xarcell:
Sounds nice, I know such "user pages" from some other forums. Well, currently I do not have time and necessity for such extension, but feel free to use my static page mod and extend it to the features you would like to have. Anyway, you should take an extra care on the permission of using php since this can be a security issue.
Regards,
Michael
Is there a way I can have the title in the page show at the top of my browser? Currently I get the URL, but not the title I have submitted.
One other problem I can't seem to figure out - when I try to use a table (which I need to do because the bg of my forum is a bit crazy), I can't see the table bg in Firefox, but it shows up in IE. Any ideas on a solution for this?
Overall - I love this mod. It makes my life easier lol
Thank you!
Quote from: Xarcell on September 14, 2005, 12:45:39 PM
Allow user's to make thier own static page. They would be able to use this as a "homepage" or whatever reason.
Invision board has a script for this. If anyone is interested down the road, toss me a PM and I can try to find it for you - might help.
Absolutely love this mod!
Quote from: ladyshanaeIs there a way I can have the title in the page show at the top of my browser? Currently I get the URL, but not the title I have submitted.
Same problem here, though.
Can i use it with SMF 1.1 RC1?
Thanks
Quote from: anunlike on September 27, 2005, 06:55:24 AM
Absolutely love this mod!
Quote from: ladyshanaeIs there a way I can have the title in the page show at the top of my browser? Currently I get the URL, but not the title I have submitted.
Same problem here, though.
dont feel like reading throughout the thread, but if you can use php in these pages, adding this line in your "static page" text box should work.
<?php
$context['page_title'] = 'whatever you want it to be';
?>
Quote from: Tippmaster on October 19, 2005, 06:04:43 PM
dont feel like reading throughout the thread, but if you can use php in these pages, adding this line in your "static page" text box should work.
<?php
$context['page_title'] = 'whatever you want it to be';
?>
I couldn't get that to work at all.
odd. it works just fine for SSI. and it's still using index.template.php..
Maybe I'm not doing it right. I just copied and pasted it into the "Static Page Mod Options" box, the same one with the actual page code and text, in the admin center and edited the title. If that's all I needed to do, it didn't work for me.
Does this work with SMF 1.1 RC1?
I tried it, and yes it does work OK on SMF 1.1 RC1.
Is there a way to make it so you have to be logged in to view the page? And you have to be in a certain member group to view it? I'll pay someone to who can show me how to do this.
I need to make static pages where you have to be logged in and your forum account needs to be in a certain usergroup for it to work. someone PLEASE help me with this.
I can offer money, and also some free webhosting....(no abdnwith cap, and not BS "metered" like other people, Why? you ask? becasue i have no wy of putting one on LOL)
Quote from: XTECHFORUM.COM on November 13, 2005, 03:22:25 PM
Is there a way to make it so you have to be logged in to view the page? And you have to be in a certain member group to view it? I'll pay someone to who can show me how to do this.
I need to make static pages where you have to be logged in and your forum account needs to be in a certain usergroup for it to work. someone PLEASE help me with this.
I can offer money, and also some free webhosting....(no abdnwith cap, and not BS "metered" like other people, Why? you ask? becasue i have no wy of putting one on LOL)
you could use this in the code
if (in_array(4, $GLOBALS['user_info']['groups']))
echo 'whatever they see';
just change the group
For, membergroups, use:
Quoteif (in_array(XX, $user_info['groups']))
fatal_error('You are not allowed blah, blah, blah.', false);
Where XX is the membergroup number. Open up "_StaticPageMod.template.php" and put that in anywhere after "<?php" and before "function template_main()". That will prevent anyone in membergroup XX from accessing all the static pages, I'm not sure how to do this on a page by page basis.
For being logged in, in the same place, use:
Quoteis_not_guest('Guests do not have access to this page blah, blah, blah.');
Be sure to change the messages to whatever you want.
That'll be $300.00 please. ;D
Quoteodd. it works just fine for SSI. and it's still using index.template.php..
Is there another way to do this?
First thing first, I never said 300$ lol, and second, really need to be able to do it on a page to page basic for what I'm trying to do.
Hi there,
I installed this mod on the 1.1 RC1 and installation was successful, but has shown an error because of missing french and russian language files. No other errors were reported, but when I create a static page and try to load it in my browser, i get this error message:
Kann das 'main' Template nicht laden.
In english: Cannot load the 'main' template.
Any ideas? Thanks!
Sorry, found the answer. Some files had 0 kB, i uploaded them again and now ist works fine.
I have the same problem.
How did you fix that exactly? (what files did you upload again, what files were 0kb, and did you uninstall the mod first?)
Thanks
I didn't uninstall the mod, simply upload the files again. It were:
/sources/_StaticPageMod.php
and
/themes/themename/_StaticPageMod.template.php
Both had 0 KB filesize on the server.
May I ask why this mod ads "up to 10 static pages" only?
Well, I limited it to 10 pages so that the options page in "Features and Options" is not too long and I think that most users do not need more than 10 pages.
But you can easily increase the number by modifying the mod. There is no problem if you increase it to 50 static pages or even more.
Michael
Quote from: nehcregit on November 18, 2005, 11:05:22 AM
I didn't uninstall the mod, simply upload the files again. It were:
/sources/_StaticPageMod.php
and
/themes/themename/_StaticPageMod.template.php
Both had 0 KB filesize on the server.
Thanks!
That did the trick, After that I had a lot of troubles with my (simplicity) template, but it all worked out fine:
http://www.waaromgod.nl/newforum/index.php?action=static&staticpage=1
Great! Looks very good, nice forum! ;)
Quote from: anunlike on September 27, 2005, 06:55:24 AM
Absolutely love this mod!
Quote from: ladyshanaeIs there a way I can have the title in the page show at the top of my browser? Currently I get the URL, but not the title I have submitted.
Same problem here, though.
I found a work around for this.
I pasted <?php $context['page_title'] = 'YourPageTitle'; ?> into the top of index.template.php of all or whatever Themes you use (example:
http://www.yourdomain.com/forum/Themes/default/index.template.php)
On my forum this did not affect any of the other page titles, anywhere else. I know it's a crude work around :)
By the way, I love this mod, and I love SMF, I'm using SMF 1.0.5, I'll post a link to my forum when I get it all arranged, I sucessfully converted my old XMB 1.9.1 forum to SMF 1.0.5 flawlessly with the converter in the downloads section
:)
Quote from: Repent on December 07, 2005, 10:15:50 PMQuote from: anunlike on September 27, 2005, 06:55:24 AMAbsolutely love this mod!
Quote from: ladyshanaeIs there a way I can have the title in the page show at the top of my browser? Currently I get the URL, but not the title I have submitted.
Same problem here, though.
I found a work around for this.
I pasted <?php $context['page_title'] = 'YourPageTitle'; ?> into the top of index.template.php of all or whatever Themes you use (example: http://www.yourdomain.com/forum/Themes/default/index.template.php)
On my forum this did not affect any of the other page titles, anywhere else. I know it's a crude work around :)
By the way, I love this mod, and I love SMF, I'm using SMF 1.0.5, I'll post a link to my forum when I get it all arranged, I sucessfully converted my old XMB 1.9.1 forum to SMF 1.0.5 flawlessly with the converter in the downloads section
:)
Great! Thank you! Though, I've made 3 static pages, so using this, I get the same title for all 3. Hmm...
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?
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?
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'] = ...>
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?
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>
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
Anyone?
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
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!!
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
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.
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...
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.
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!
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 ended up having to do it THIS (http://www.simplemachines.org/community/index.php?topic=35837.0) way. You have to add the content manually, but it works pretty good. Also, you may want to see THIS (http://www.simplemachines.org/community/index.php?topic=63203.0) 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.
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.
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?
I would love to see this mod working with RC2, it's just what i need for my site.
I think that this is exactly what I need anyone updating this Mod?
Thanks
You could use TinyPortal http://www.tinyportal.net/smf/index.php and get all the static pages you want. Dont have to use Portal features, can turn off left, center, right blocks and have it start up with normal forum index. Of course TinyPortal is very integrated with SMF - shouldnt be any complications.
With a bit of iframe code you can make a decent Gallery in few minutes using static page mod, lots of other uses - too bad no updates.
Yeah I found that MOD. I am having a few problems with it though, I really like it but. Some things are working and somethings are not. Working on it though.
Thanks
Well those into Tinyportal are also die hard SMF users, just look at Bloc!, so it should work for sure. If it was more of a 3rd party thing Im not sure I would mention it. Depends, as with mod-people those can suddenly dissapear and then what? TP seems like it is here to stay.
You can do the same with MKportal btw. Turn off left/right columns. Hack off header. Make it start up as if Portal was not there. Then make buttons, links to whatever static or other content you make in MKportal. TP solution much easier and better - MKportal a bit shaky with development last I looked... has become too much 3rd party perhaps ;)
You could give Enigma 2 a try. The RC is said to be near completion. It's a great portal system. Check it out.
I've got SMF 1.0.6, and the install script never completes - I get to step 9:
9. Extract File ./Sources/_StaticPageMod.php
and the page just quits. I tried manually doing steps 9, 10, and 11, but the script is still not installed. Any ideas?
The mod works perfect with smf 1.0.7 .
Thank you!
What's the code for version 1.1 RC2?
What's the code for version 1.1 RC2?
Quote from: SurfExcelerator.com on July 16, 2006, 11:01:21 PM
What's the code for version 1.1 RC2?
Don't need to keep bumping it up since I think the person left. Try the custom action mod by winrules
i got this error while installing...
Quote1. Execute Modification ./Themes/default/languages/Help.english.php Test successful
2. Execute Modification ./Themes/default/languages/Help.german.php File not found
3. Execute Modification ./Themes/default/languages/Help.french.php File not found
4. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
5. Execute Modification ./Themes/default/languages/Modifications.german.php File not found
6. Execute Modification ./Themes/default/languages/Modifications.french.php File not found
7. Execute Modification ./Sources/ModSettings.php Test failed
8. Execute Modification ./index.php Test successful
9. Extract File ./Sources/_StaticPageMod.php
10. Extract File ./Themes/default/_StaticPageMod.template.php
11. Execute Code staticpagemod_mysqlsettings_add.php
I understand i can ignor the language file.
but the
ModSettings.php failed.
any answer ?
You will need to install it manually search on this forum on how todo so.
Excellent Mod, works beautifully. ;D
Thank you very much Michael.
I'd like my static pages to be available only to logged in members. Can anyone tell me what to add to the template and where?
<?php
/* =============================================================================
************************** SMF STATIC PAGE MOD 1.3 *****************************
============================================================================= */
function template_main()
{
global $modSettings, $scripturl, $context, $settings, $options, $txt;
// Retrieve the HTML content to display. For $_REQUEST['staticpage'],
// a value between 1 and 5 is supported.
$local_settingvar = "staticpage_Content" . $_REQUEST['staticpage'];
$local_staticContent = $modSettings[$local_settingvar];
// Display the content
if (!empty($local_staticContent)) {
// The setting variable is not empty so we display the content
echo eval('?' . '>'. $local_staticContent); //using eval allows the usage of php
}
else {
// the content is empty or the $_REQUEST['staticpage'] is not a value between 1 and 5, so we
// redirect to forum's home.
echo '
<b>The requested page does not exist.</b><br /><br />
If you are not taken to another page within 5 seconds, <a href="', $scripturl, '">click here</a>
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=', $scripturl, '">
';
}
}
?>
Thanks much again Michael
Something like this?
<?php
/* =============================================================================
************************** SMF STATIC PAGE MOD 1.3 *****************************
============================================================================= */
function template_main()
{
global $modSettings, $scripturl, $context, $settings, $options, $txt;
if (!$context['user']['is_logged'])
fatal_error('You must login to see this page!');
else
{
// Retrieve the HTML content to display. For $_REQUEST['staticpage'],
// a value between 1 and 5 is supported.
$local_settingvar = "staticpage_Content" . $_REQUEST['staticpage'];
$local_staticContent = $modSettings[$local_settingvar];
// Display the content
if (!empty($local_staticContent)) {
// The setting variable is not empty so we display the content
echo eval('?' . '>'. $local_staticContent); //using eval allows the usage of php
}
else {
// the content is empty or the $_REQUEST['staticpage'] is not a value between 1 and 5, so we
// redirect to forum's home.
echo '
<b>The requested page does not exist.</b><br /><br />
If you are not taken to another page within 5 seconds, <a href="', $scripturl, '">click here</a>
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=', $scripturl, '">
';
}
}
}
?>
exactly bugeyes ;D Thank you kindly.
ooooooops!
hmmmm :o It seems to be blocking all. I log in, post the link and try to view the page and I still get the messege.
Even on an emptied cache.
Hello, I get problems while trying to install the SPM.
It looks like the installation failed, but for some reasons that would be quite long to explain I do not really can install it back.
So I try now to modify the pages myself (this gives me no problems), following instructions in the xml file. Then I arrive on this:
<!-- ===================================================================
For Textarea: Modify some code
==================================================================== -->
-->
<operation>
<search position="replace"><![CDATA[
$context['raw_data'] .= '
<td class="windowbg2"><label for="' . $config_var[1] . '">' . (isset($config_var[3]) ? $config_var[3] : $txt[$config_id]) . '</label></td>
<td class="windowbg2" width="50%">';
]]></search>
<add><![CDATA[
// ************************ Begin: Modified for Static Page Mod *****************
$context['raw_data'] .= '
<td class="windowbg2" valign="top"><label for="' . $config_var[1] . '">' . (isset($config_var[3]) ? $config_var[3] : $txt[$config_id]) . '</label></td>
<td class="windowbg2" valign="top" width="50%">';
// ************************ End: Modified for Static Page Mod *******************
]]></add>
</operation>
<!-- ===================================================================
For Textarea: Add some code
==================================================================== -->
-->
<operation>
<search position="after"><![CDATA[
// If it's a password...
]]></search>
<add><![CDATA[
// ************************ Begin: Added for Static Page Mod *****************
// If it's a textarea.
elseif ($config_type == 'textarea')
$context['raw_data'] .= '<textarea id="' . $config_id . '" name="' . $config_id . '"' . (isset($config_var[2][0]) ? ' rows="' . $config_var[2][0] . '"' : '') . (isset($config_var[2][1]) ? ' cols="' . $config_var[2][1] . '"' : '') . ' style="font-family: monospace;">' . htmlspecialchars($modSettings[$config_id]) . '</textarea>';
// ************************ End: Added for Static Page Mod *****************
]]></add>
</operation>
<!-- ===================================================================
For Textarea: Add some more code
==================================================================== -->
-->
<operation>
<search position="after"><![CDATA[
// Text and passwords!
]]></search>
<add><![CDATA[
// ************************ Begin: Added for Static Page Mod *****************
// Textarea.
elseif ($var[0] == 'textarea')
$setArray[$var[1]] = $_POST[$var[1]];
// ************************ End: Added for Static Page Mod *****************
]]></add>
</operation>
Actually, it concerns all "Textarea" related instructions in the $sourcedir\ModSettings.php file (I am using SMF 1.1 RC3, and downloaded SPM 1.3).
The problem is that I do not find the positions where I must add or modify code. There is no "$context['raw_data']", no "// If it's a password...", no "// Text and passwords!" in the file.
So I wonder where I must modify the file!
Can anybody help me to do so?
Thanks.
I just recently upgraded from 1.0.8 to rc3 myself and never did get the SPM mod to follow me and continue to function.
I don't mean to step on any toes, but I don't think the person that brought this mod to the forum comes around anymore.
Might I suggest getting the Custom Action Mod instead here; http://mods.simplemachines.org/index.php?mod=331
You'll get unlimited static pages in HTML, PHP, or BBC. It installed flawlessly and the possibilities seem endless.
Many thanks, I'll try it. ;)
Doesn't seem to work w/ 1.1.1 chokes at Modsettngs.php
Yea, I got the same error.. Any chance of seeing this mod updated to work with 1.1.1?
yes please - this is a great idea. I've always wanted something like this, but didn't know how.
The author of this mod hasn't logged on to this forum since November 25, 2005. Therefore it may be unlikely it will be updated (or anytime soon). However there is an alternative mod that is similar to this mod. http://custom.simplemachines.org/mods/index.php?mod=331
haha, guess we should've checked on that. Thanks for that tip akabugeyes. I had no idea the custom action mod could do this.
Hey, sorry to bring this topic back up, but is there a MOD like this compatible with SMF 1.1.3?
The MOD bug mentioned, would that work?
Thanks
- Souljaa
This is a greate Mod. I cant believe that no one tried to get this working with the latest version of SMF