News:

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

Main Menu

Posting, viewing topics, etc. at a seperate URL?

Started by JoeTheBro, October 23, 2014, 07:37:55 PM

Previous topic - Next topic

JoeTheBro

I currently have a forum at hxxp:mysite.com/forum [nonactive]. At hxxp:mysite.com/blog [nonactive] I need to have select topics displayed plus the functionality that goes along with them. The examples "Board News" and "Sample 1" at http://www.simplemachines.org/community/ssi_examples.php# show the basics of what I'm needing, but the links in those examples go back to the forum.

Even though the content is shared between hxxp:mysite.com/forum [nonactive] and hxxp:mysite.com/blog [nonactive], I need fully separate user experiences. All links at the blog need to go to the hxxp:mysite.com/blog [nonactive] equivalent of their content. So I don't just need to change the link address, but make the page for it to link to as well. As far as making the blog visually different, I discovered I can force the SSI site to have a different theme by putting

<?php
$ssi_theme 
X;
require_once(
'/path/to/forum/SSI.php');
?>

That works great for giving the blog its unique visuals, but I'm stuck with trying to copy over functionality outside the built in SSI functions. Is this a realistic way to get what I need though? If so, where do I go from here?

Or would a better solution be to make a fully new installation of smf at hxxp:mysite.com/blog [nonactive] with linked databases? I've read that has lots of issues out of the box, but would fixing that up be less work than messing with SSI.php?



Kindred

Quite honestly, there is no really good way to do what you are asking... Neither with duplicate copies nor with ssi...   You could try dougiefresh's split forum mod... But that doesn't duplicate content between sites, it allows you to share users between multiple content sites.
Сл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."

JoeTheBro

Quote from: Kindred on October 23, 2014, 07:40:35 PM
Quite honestly, there is no really good way to do what you are asking... Neither with duplicate copies nor with ssi...   You could try dougiefresh's split forum mod... But that doesn't duplicate content between sites, it allows you to share users between multiple content sites.
Hmm. Thanks for the feedback.


What about changing the url in .htaccess?

mysite.com/blog could be served from hxxp:mysite.com/forum [nonactive] right? Then all I'd need to do was figure out a way to set a temporary theme by url.

Kindred

No,., if you tried to do htaccess, then you would end up with an endless loop as your forum tried to use the url defined in itself and your htaccess tired to redirect it.


I alreayd indicated that you could use the split forum mod to display different themes by directory or subdomain... But I do not think that it currently handles the same content displayed on the different forums...
Сл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."

JoeTheBro

Quote from: Kindred on October 23, 2014, 09:02:45 PM
No,., if you tried to do htaccess, then you would end up with an endless loop as your forum tried to use the url defined in itself and your htaccess tired to redirect it.


I alreayd indicated that you could use the split forum mod to display different themes by directory or subdomain... But I do not think that it currently handles the same content displayed on the different forums...

I believe I've got it solved, or at least in a state that I can manage from here.

At hxxp:mysite.com/blog [nonactive] I copied over index.php and settings.php from my forum. In settings everything is kept the same, except $boardurl which is changed to match the new location. This makes the forum function perfectly in the new location while still using all the files of the original.

Then to stop problems from having effectively two forums running on the same data, I removed scheduled tasks from the new index file. Everything seems to work perfectly, off the top of your head would there be any additional problems I've forgotten about?



To force the theme, I replaced "loadTheme();" in index.php with "loadTheme(X);"

Thanks for the help :)

Kindred

yup... there are LOTS of potential issues with what you have done.

Quote from: Kindred on October 23, 2014, 07:40:35 PM
Quite honestly, there is no really good way to do what you are asking...

Сл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."

Advertisement: