News:

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

Main Menu

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

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

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

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...

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

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.)

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

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

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

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

DO NOT pm me for support!

ColinJM

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

Colin

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

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

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.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: