Prepend Forum with website

Started by ColinJM, February 13, 2024, 02:52:39 AM

Previous topic - Next topic

ColinJM

Hi All, I'm prepending my forum with a website  and want to do the following.

1) The forum Home "button" goes to the URL of the Web Site I'm building which will be under the same domain and hosting C panel access public_html root directory.
2) The log in post screen to be the website I'm building.

I've already modded the .htaccess file to point to the website index.html, rather that the forum index.php.
Kind Regards

Colin

Slava
Ukraini!

Kindred

That htaccess is a BAD BAD BAD idea.

Don't do that.

Put your forum in a subdirectory.
Use the root directory for your main site.

You can add or change buttons in the button array in subs.php (see the faq for details)
Сл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."

Doug Heffernan

Quote from: ColinJM on February 13, 2024, 02:52:39 AM1) The forum Home "button" goes to the URL of the Web Site I'm building which will be under the same domain

You can use this mod for that.

https://custom.simplemachines.org/index.php?mod=4379

Quote from: ColinJM on February 13, 2024, 02:52:39 AM2) The log in post screen to be the website I'm building.

I am not sure that I quite understand this part, can you please elaborate a little further?

Arantor

I assume he means the screen you go to after you log in. Which is... a complicated concept because most people will just stay logged in forever and only see that other page once.

Unless there's a truly burning need for it more regularly, other better approaches exist but that sort of depends on what the driving need is. It's often far better to get at less if "I need to do (specific thing)" and more "I have an outcome I'm trying to get to, for which I assume (specific thing) will be the easiest and most logical way forward"... sometimes it is, sometimes it isn't.

Years of application building tells me it's more often not the case and that better solutions exist once the problem is understood rather than the problem being "a specific solution".
Holder of controversial views, all of which my own.


Kindred

On second thought...  why don't you just use one of the portal mods?

Then you get your custom homepage,  including thevpost-login landing page without hacking the system
Сл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."

ColinJM

#5
OK a bit more awake it's 7:20am and I'm nearly 70 after a stroke so bear with me  :P

Quote from: Kindred on February 13, 2024, 08:25:38 AMThat htaccess is a BAD BAD BAD idea.

Don't do that.

Put your forum in a subdirectory.
Use the root directory for your main site.


Hi Kindred

Why is using a .htaccess file such a bad idea?

Won't that require users to specify a discrete URL like www.{domain name}.index.html to avoid the www.{domain name} resolving to the std index.php ?



Quote from: Doug Heffernan on February 13, 2024, 08:57:06 AM
Quote from: ColinJM on February 13, 2024, 02:52:39 AM1) The forum Home "button" goes to the URL of the Web Site I'm building which will be under the same domain

You can use this mod for that.

https://custom.simplemachines.org/index.php?mod=4379

Quote from: ColinJM on February 13, 2024, 02:52:39 AM2) The log in post screen to be the website I'm building.

I am not sure that I quite understand this part, can you please elaborate a little further?

Hi Doug

Thanks for that mod I'll check it out.

OK - the log in part - If a person is logged out it will go to the log in screen - so I want the Log In button to resolve to the web page - index.html so the webpage becomes the forum new landing page and content on the website points to content within the forum using board/sub board URLs.

If they are logged in a refresh of their browser cache will repoint wwww.{domain name} to the website.


Quote from: Arantor on February 13, 2024, 09:23:18 AMI assume he means the screen you go to after you log in. Which is... a complicated concept because most people will just stay logged in forever and only see that other page once.

Unless there's a truly burning need for it more regularly, other better approaches exist but that sort of depends on what the driving need is. It's often far better to get at less if "I need to do (specific thing)" and more "I have an outcome I'm trying to get to, for which I assume (specific thing) will be the easiest and most logical way forward"... sometimes it is, sometimes it isn't.

Years of application building tells me it's more often not the case and that better solutions exist once the problem is understood rather than the problem being "a specific solution".

Hi Arantor

Yes and see above as to the first para.
I read your second  para - but I had to stop because I was getting a brain explosion alert  ;D


Quote from: Kindred on February 13, 2024, 10:47:55 AMOn second thought...  why don't you just use one of the portal mods?

Then you get your custom homepage,  including thevpost-login landing page without hacking the system

Can you explain please - portal mod? which mod? Can you give me a URL?



Kind Regards

Colin

Slava
Ukraini!

Arantor

Basically what I'm asking is what you're trying to achieve. You've said what you're trying to do in as far as how you're trying to do it, but I'm not sure I understand what the goal actually is.

For example, what's the need for changing the page that people arrive at when they log in? One assumes if they're logging into the forum, it's to participate in the forum...
Holder of controversial views, all of which my own.


ColinJM

Quote from: Arantor on February 13, 2024, 07:17:02 PMBasically what I'm asking is what you're trying to achieve. You've said what you're trying to do in as far as how you're trying to do it, but I'm not sure I understand what the goal actually is.

For example, what's the need for changing the page that people arrive at when they log in? One assumes if they're logging into the forum, it's to participate in the forum...

Hi Arantor,

Ok....the need is driven by a number of factors. The forum member demographic is older people that have retired, many of whom have very limited computer user skills or forum experience. We would like to keep the community admin onside who are keen to have a responsive tile driven web page that is visually more engaging and use the excellent forum as the engine. Hope that answers your question?
Kind Regards

Colin

Slava
Ukraini!

Kindred

So, your answer is actually that you should add a portal mod, which will let you have a front page.

That htaccess idea is bad. Not htaccess itself,  but trying to put an html index in thr same directory as the forum index.php and using htaccess to redirect to it. That will mess up ALOT.

If you insist on using an html page, then move the forum to a subdirectory e.g. /forum

But, to handle the request for the login redirect is more complicated.
And without a portal  mod, your index (landing page) will have to be php and use SSI.

So, it's much easier to just use a portal mod
Сл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."

Arantor

It does - and changes what you're actually asking for, because what that suggests to me *isn't* really to change the page people see when they land on the site after logging in, but to rethink the home page entirely.

Again this comes back to the fact about how people 'log in' to the site typically means they'll log in on their device and stay logged in rather than explicitly logging in frequently.

The point of impact then becomes the front page overall, potentially whether they're logged in or not, and I think Kindred was right, that the approach is to add a portal mod.

Realistically I think this means either Light Portal or TinyPortal which you download from the site and install via the Package Manager, and these let you do things like change the front page and add tiles of content. (Responsive is a little more tricky to get going but doable with effort.)
Holder of controversial views, all of which my own.


ColinJM

Thanks Kindred and Arantor

Had a quick look at the portal mods - will have a much deeper look later.

I use my approach because I'm very familiar with the WebBuilding software I use.
Kind Regards

Colin

Slava
Ukraini!

Kindred

Well. As familiar as you might be - that original thought would be the wrong approach 
Сл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."

ColinJM

Quote from: Kindred on February 13, 2024, 10:53:37 PMWell. As familiar as you might be - that original thought would be the wrong approach 
I might agree with you once I've had a good look at a better look and play with the portal mods.
Kind Regards

Colin

Slava
Ukraini!

ColinJM

Quote from: Doug Heffernan on February 13, 2024, 08:57:06 AM
Quote from: ColinJM on February 13, 2024, 02:52:39 AM1) The forum Home "button" goes to the URL of the Web Site I'm building which will be under the same domain

You can use this mod for that.

https://custom.simplemachines.org/index.php?mod=4379


Thanks Doug that fixed the Home link in the forum - now goes to my website
Kind Regards

Colin

Slava
Ukraini!

Doug Heffernan

Quote from: ColinJM on February 14, 2024, 02:18:39 AMThanks Doug that fixed the Home link in the forum - now goes to my website

Happy to have been of help.


Steve

My pet rock is not feeling well. I think it's stoned.

ColinJM

They have thanks Steve - I've marked this has solved.
Kind Regards

Colin

Slava
Ukraini!

ColinJM

OK I've installed Tinyportal but somehow managed to end up with a couple of unwanteds:

- The forum now shows side panels.
- I've ended up with a new forum menu item rhs of home.
- index.php displays the following - not the home page of the forum:
Kind Regards

Colin

Slava
Ukraini!

Sir Osis of Liver

You can enable/disable TP blocks in TP admin if you want to remove the two side columns.  It creates a frontpage with a menu link to the forum.  You can select where in the forum TP is displayed, or not.  Will have to install it in test install to give you more specific info if you need it, only used it on couple of forums.
When in Emor, do as the Snamors.
                              - D. Lister

Sir Osis of Liver

Ok, I've installed current version TP 3.0.0 in 2.1.4.  TP adds a TinyPortal button to main menu that takes you to TP admin.  You can disable individual blocks in Blocks, or remove the right and/or left columns in Panels.  In Frontpage you can select what is displayed on frontpage, where it is displayed, or you can have it go directly to forum index.
When in Emor, do as the Snamors.
                              - D. Lister

ColinJM

OK thanks SOoL will give you a yell if I need to  8)
Kind Regards

Colin

Slava
Ukraini!

Kindred

You should also address questions about how tinyportal works in the thread or website dedicated to supporting tinyportal
Сл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."

ColinJM

Quote from: Kindred on February 16, 2024, 08:57:38 PMYou should also address questions about how tinyportal works in the thread or website dedicated to supporting tinyportal

Ah, fair enough - different forums have different rules - note this one's thanks Kindred  8)
Kind Regards

Colin

Slava
Ukraini!

ColinJM

Quote from: Kindred on February 16, 2024, 08:57:38 PMYou should also address questions about how tinyportal works in the thread or website dedicated to supporting tinyportal

Can you give me the link please Kindred
Kind Regards

Colin

Slava
Ukraini!

Sir Osis of Liver

When in Emor, do as the Snamors.
                              - D. Lister

Sir Osis of Liver

If you set Admin > Frontpage to 'Go directly to forum index', login goes to forum index. If you disable all panels, it basically removes the portal altogether, then you can add back in what you want.
When in Emor, do as the Snamors.
                              - D. Lister

ColinJM

I'll keep going in here - because I'm not sure it's within tinyportals commit - what I want to do at the moment until I get a full handle on tiny portal is to go to a home page website when people log in.

Yes I do realise that ultimately, I should do this with tinypermit I think thepathing to my website for the time being is external tinypermit

Kind Regards

Colin

Slava
Ukraini!

lurkalot

In TinyPortal > Settings

How to redirect after login: Select either,

Redirect to forum.
Redirect to frontpage.

And Save.

On that same Settings page, you can hide the TinyPortal menu so it only shows to Admins, by checking the box next to, "Hide TinyPortal menu option"

And save.

You can basically make the portal as invisible as you want.

ColinJM

@lurkalot - out of respect for @Kindred ' s comment I'll quote and respond in the appropriate thread.  ;D
Kind Regards

Colin

Slava
Ukraini!

Kindred

@ColinJM

You can't do both.
Honestly you can't do what you are asking for with the external website at all without some major reprogramming... and the way you have it currently set up with index.html in the same directory as index.php, using htaccess will also break things.

Get tinyportal working.
Tell your users to chill while the system is correctly built.
Otherwise you are tempting fate AND doing double work for no reason
Сл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."

ColinJM

Kind Regards

Colin

Slava
Ukraini!

ColinJM

Quote from: Doug Heffernan on February 13, 2024, 08:57:06 AM
Quote from: ColinJM on February 13, 2024, 02:52:39 AM1) The forum Home "button" goes to the URL of the Web Site I'm building which will be under the same domain

You can use this mod for that.

https://custom.simplemachines.org/index.php?mod=4379


Thanks Doug that fixed the Home link in the forum - now goes to my website

[/quote]

@Doug Heffernan - I've implemented that but I want it to open the same browser tab not a new tab in the same browser session - what do I have to change?
Kind Regards

Colin

Slava
Ukraini!

Sir Osis of Liver

You can do that in Subs.php, look for "all the bottons".  That's the main menu buttons array. 

When in Emor, do as the Snamors.
                              - D. Lister

Kindred

The OPis using a mod for the home button



Colin, ask in the mod support thread
Сл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."

ColinJM

Thanks Kindred - will do. Flagged this as solved  :)

Ha! you beet me to it  8)
Kind Regards

Colin

Slava
Ukraini!

Sir Osis of Liver

Quote from: Kindred on March 17, 2024, 10:40:06 PMThe OPis using a mod for the home button

You don't need a mod for the home button, it's easier (and more instructive) to do it in Subs.php -


            'home' => array(
                'title' => 'Home',
                'href' => 'https://www.yourwebsite.com',
                'show' => true,
                'sub_buttons' => array(
                ),
                'is_last' => $context['right_to_left'],
            ),


It's the "Give a man a fish...." thing.

When in Emor, do as the Snamors.
                              - D. Lister

Doug Heffernan

Quote from: Sir Osis of Liver on March 18, 2024, 01:20:50 PMYou don't need a mod for the home button, it's easier (and more instructive) to do it in Subs.php -

It's always best to avoid file edits as much as possible imo.

Sir Osis of Liver

Well, I believe it's always best to avoid mods whenever possible, unless forum owner is a total noob.  Colin seems up to it.
When in Emor, do as the Snamors.
                              - D. Lister

Kindred

Well, since Colin already decided to go with the MOD, your point is moot, Sir Osis :P

Seriously though -- even when an admin makes edits -- it would be MUCH better to then package those edits as a mod for future reproduction if the site needs to get a reload ---  so Mods are better than direct edits!
Сл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: