How to make a page that looks like the forum but doesn't use forum permissions?

Started by anidea, August 25, 2019, 06:16:00 PM

Previous topic - Next topic

anidea

I'm gonna try this again.  Thanks in advance to those who attempt to put me in the right direction lol

Is there any way to create a page that resembles the forum (or possibly uses the forum) but does *not* use forum permissions, ie. is viewable to guests and the rest of the world?  Both forum members and not forum members?

Can you do this with a page that is not part of the forum?  How would you do it?

Is it possible to set a page inside of the forum visible to both members and guests?  How would you do that?

I can't seem to fix the problem I have, so I'm gonna work on creating new problems for myself lol because it's so much fun :D

Again, thank you for any attempts to set me in the right direction.  I need a serious push.  Maybe even big blinking neon lights would help, IDK at this point.  It's not a fun way to spend my Sunday.

Looking

Yes you can. You can use SSI, a custom page or custom code. Chose your method. ;)

lurkalot


anidea

Quote from: Looking on August 25, 2019, 06:28:48 PM
Yes you can. You can use SSI, a custom page or custom code. Chose your method. ;)

I tried that.  But guests can only see the login page.  They cannot see the custom page.  I don't know how to fix it, and nobody can tell me how to fix it.  That's why I want to try again.

Is there a mod that does this that you prefer?  Or a particular place to get this custom page?   If so, which one/where?

anidea

Quote from: lurkalot on August 25, 2019, 06:49:31 PM

Or perhaps a Portal.

I tried a portal in the past.  It was a miserable failure.  Plus, I don't need a whole portal, I just need one page to be visible.

Looking

Then it sounds like the issue is more than a mod... it may be some of your SMF settings or server settings

anidea

Quote from: Looking on August 25, 2019, 07:07:09 PM
Then it sounds like the issue is more than a mod... it may be some of your SMF settings or server settings

But which SMF settings? 

Am I asking the wrong questions?  Or am I asking the right questions wrongly?  I'm happy to adjust, but I don't know what ya'll want.  :'( 
Edit: ookey, I get it, it's about money.  I get it, really I do, there is no free.  I just don't have any.  Thank you anyway.  All these forums are going facebookey anyway.  Why should this one be any different.  No worries, I'll stop asking until the money gods grant me money to spend.

Mick.

You can use a portal. Just need to know how to use it. SimplePortal mod is my fave choice.


anidea

https://www.simplemachines.org/community/index.php?topic=569370.0

Basically, I used some template that I got somewhere here to create index.php (a home page that describes what the forum is about) that I thought would be visible to guests (and everyone) that would sit outside the smf folder but would look like the rest of smf because of the SSI reference and template reference.  I didn't realize that it never worked right because my brain didn't work right when I did it, and now that my brain is slightly better I'm trying to get back to it and make it work (like it should have all these years) but maybe my brain isn't better enough yet because this is causing a headache.  I used to be a programmer before it all went wonky, but I can't do that work anymore but I thought I might be able to figure this out because it's not exactly programming but clearly I can't.  Sorry, maybe that's too much information.  I'm gonna go take a walk.  I really do appreciate the responses though.  I'll try again later.

lurkalot

Quote from: anidea on August 25, 2019, 07:02:53 PM
Quote from: lurkalot on August 25, 2019, 06:49:31 PM

Or perhaps a Portal.

I tried a portal in the past.  It was a miserable failure.  Plus, I don't need a whole portal, I just need one page to be visible.

A very quick example of using TinyPortal https://cctestsite.info/testsite2/index.php

You don't have to use the rest of the portal, but obviously you can use what you want when you want.

anidea

Thanks :)  I'll try again.

What I'm afraid of is that there are so many mods on this thing that what I really need to do is a fresh install, but I'm afraid of that too lol

Beautiful house panther, btw.

Illori

i  believe most portal mods follow SMF for permissions, so if you dont allow guests to view the forum the portal would not be visible either.

if you add $user_info to your globals, you can surround the code in an if for

$user_info['is_guest'] i believe that should make the page display for guests.

if that does not work maybe $context['user']['is_guest'] would work, you would need to add $context to your globals.

Looking

Try following the suggestions given by others about the portal as there are many variables to what you are saying is the issue and sometimes, from experience, the issue is not what you are seeing as the end result but something else.

lurkalot

Quote from: Illori on August 25, 2019, 08:06:46 PM
i  believe most portal mods follow SMF for permissions, so if you dont allow guests to view the forum the portal would not be visible either.

if you add $user_info to your globals, you can surround the code in an if for

$user_info['is_guest'] i believe that should make the page display for guests.

if that does not work maybe $context['user']['is_guest'] would work, you would need to add $context to your globals.

I hid the boards from guests then added one front page block, and one upper block on the forum index for my example.  Obviously you can add different content / info to the front page for logged in members

anidea

Fatal error: Uncaught Error: Function name must be a string in /home/public/smf/Sources/ScheduledTasks.php:1194 Stack trace: #0 /home/public/smf/Sources/Load.php(2008): loadEssentialThemeData() #1 /home/public/smf/Sources/TPortal.php(23): loadLanguage('TPortal') #2 /home/public/smf/SSI.php(67): require_once('/home/public/sm...') #3 /home/public/index.php(6): require('/home/public/sm...') #4 {main} thrown in /home/public/smf/Sources/ScheduledTasks.php on line 1194

I give up.  Long live fakebook.

Sir Osis of Liver

Are you just trying to add a custom landing page that guests can see, like this?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

anidea


Sir Osis of Liver

Hmm, did that years ago, will have to dig up the code to see how it's done.

Ok, basically you place your custom page in function template_kick_guest() in Login.template.php.  Instead of seeing the login window, guests see the custom page between the index template header and footer.
You have to add a header login if your theme doesn't have one, but that's easy.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

anidea

Quote from: Sir Osis of Liver on August 25, 2019, 11:52:41 PM
Hmm, did that years ago, will have to dig up the code to see how it's done.

That's exactly my problem.  I think there was either a mod or a post somewhere that I got a template, only I never did it correctly, and I've been trying to go back and fix past mistakes, only now there are no instructions.  :(  So I have the page together, but for whatever reason, guests can't see the landing page, only members can see the landing page, but members don't need to see the landing page.

Advertisement: