Threads in root folder

Started by pittu, December 29, 2014, 11:52:11 AM

Previous topic - Next topic

pittu

1. Is there any mod that creates threads in root of installation? (like page mod. but I want threads itself. Not pages.

2. If not is it advisable/easy to create a mod?

thnx.

Arantor

To do *what* exactly?

I don't understand the question. SMF topics are all index.php?topic=1.0 type stuff, they aren't files or anything.
Holder of controversial views, all of which my own.


pittu

Will ask different way ...

Can a mod can be built so it uses SMF template to create a static page(s) in smf root folder?

Arantor

Sure - but that's not using *threads*.

To achieve what you want can be done with something as simple as:

<?php
require_once('SSI.php'); // If not in the same folder as SSI.php, adjust path to suit

$context['page_title'] = 'My Page Title';

template_header();

echo
'My content goes here';

template_footer();
?>
Holder of controversial views, all of which my own.


pittu

If I want 8 static pages, I need to create 8 .php pages with this code? (Ofcourse different content)


Arantor

Holder of controversial views, all of which my own.


pittu

They can be displayed like this: (I have Pretty URLs installed).

mysite.com/page1/
mysite.com/page2/
mysite.com/page3/

Instead of this:

mysite.com/page1.php
mysite.com/page2.php
mysite.com/page3.php


Arantor

You would typically do that with making them page1/index.php then calling require_once('../SSI.php');

But Pretty URLs has a real habit of messing with this stuff :(
Holder of controversial views, all of which my own.


pittu

I found a work around to my stress.

I created a board called 'page1' with no permission to post or anything. Only readable. With specific theme.

I used the mysite.com/page1/ to post page specific content. So no pretty urls messing up.

But is it possible to keep something like this:

{if board id=2}
some content
{if board id=3}
different content
{if board id=7}
some other content

on theme pages?

thnx.

Arantor

The code I gave you will use the SMF theme to display it...

You won't be able to do multiple items in a single file however because the way you have it specifically requires one page for each. It is possible to do but it requires a LOT more work to make happen the way you would want.
Holder of controversial views, all of which my own.


Kindred

perhaps it would be better if you CLEARLY explained what you are ACTUALLY trying to do?   Because Arantor has been giving you advice based on the concept of creating a specific PAGE...   while I seem to get the idea that you are not actually talking about a separate page, but more similar to something like the "display a single thread" mod.

What is this "some content" and "Different content" that you mention...

Display "some content" WHERE?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

pittu

I installed SMF in root of website. I  created few forums for client support.

But I want 8 static pages that should be display like this: (without much work/update in future)
Each page has different content. And layout I want same like SMF forum.

mysite.com/page1/
mysite.com/page2/
mysite.com/page3/

Arantor

And I already told you the easiest way to do this: 8 folders, 8 files with the skeleton code I already gave you which you can put your content in.

Any other method requires VASTLY more work.
Holder of controversial views, all of which my own.


margarett

Another alternative would be Custom Actions MOD but then you would need to work out Pretty URLs to recognize those actions
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: