News:

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

Main Menu

Smf Pages System

Started by Doug Heffernan, January 25, 2022, 02:08:09 PM

Previous topic - Next topic

Doug Heffernan

Link to the mod

This mod will add a page system to your forum.

Shambles

It won't add it to my forum :P   (2.0.19)

Mick.

Quote from: Shambles on January 25, 2022, 02:23:57 PMIt won't add it to my forum :P   (2.0.19)
Looks like it's only for 2.1 RC4, 2.1 RC1, 2.1 RC2, 2.1 RC3


Mick.

Quote from: Doug Heffernan on January 25, 2022, 02:29:10 PM
Quote from: Shambles on January 25, 2022, 02:23:57 PMIt won't add it to my forum :P  (2.0.19)

That was a good one  ;D
Oh. Ha!

Nice mod tho'. I dloaded it, now thinking on what can I use it for. I loved the custom action action mod and this should do the same. I dig it.

-Rock Lee-

I'm just testing some things in 2.1 so if I can add this to see how it goes :P, great job!

After let the translation Spanish ::)


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Shades.

I created a page and when I click on it in admin it says "You are not allowed to access this section". ???

I thought it was me but I just installed two fresh (Nightly) test sites just to see and had the same error on both.
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 04:12:18 PMI created a page and when I click on it in admin it says "You are not allowed to access this section". ???

I thought it was me but I just installed two fresh (Nightly) test sites just to see and had the same error on both.

Can you re-download it again, give it another try and let me know how it will go?

Shades.

Cool works great! I like it! 8)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean


Shades.

How do I remove "Pages" from the top menu bar? O:)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 04:51:19 PMfrom the top menu bar?

Do you mean to remove the menu button altogether?

Shades.

Yes :)

Since there are no per page permissions I'd like to make only certain pages visible in the menu via ultimate menu mod. ;)
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 05:01:00 PMYes :)

Since there are no per page permissions I'd like to make only certain pages visible in the menu via ultimate menu mod. ;)

At the Subs-Pages.php file inside sources, replace the pages_menu_button function with this:

function pages_menu_button(&$menu_buttons)
{
   loadLanguage('Pages');
   return false;
}

Diego Andrés

You'd probably need to add the return AFTER loading the language file  :P

//Add the pages button at the navigation.
function pages_menu_button(&$menu_buttons)
{
	
loadLanguage('Pages');

	
return 
false;
}

SMF Tricks - Free & Premium Responsive Themes for SMF.

Doug Heffernan

Quote from: Diego Andrés on January 25, 2022, 05:09:31 PMYou'd probably need to add the return AFTER loading the language file  :P

//Add the pages button at the navigation.
function pages_menu_button(&$menu_buttons)
{
	
loadLanguage('Pages');

	
return 
false;
}


Forgot about that. Thanks for the reminder :)

Shades.

#16
For some resason that cause my first test site a 500 error so I reuploaded the original sub-pages.php and cleared browser and now its still a 500 error page.

So I tried the 2nd test site and same thing! Now both are showing 500 error pages and I've verified all file are there and permissions are correct. I don't know what happened! :o

Edit: restore_setting.php got the site back up but had to disable all hooks
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 25, 2022, 05:36:25 PMFor some resason that cause my first test site a 500 error so I reuploaded the original sub-pages.php and cleared browser and now its still a 500 error page.

So I tried the 2nd test site and same thing! Now both are showing 500 error pages and I've verified all file are there and permissions are correct. I don't know what happened! :o

Edit: restore_setting.php got the site back up but had to disable all hooks

Do you mean that the 500 error you got was for the whole forum and not just the pages? That is strange, there is nothing in the code that would cause that. And the 500 errors is more of a server issue. Anyways, is there any specific error pertaining to this logged in the error log?

Shades.

Quote from: Doug Heffernan on January 26, 2022, 11:42:27 AMDo you mean that the 500 error you got was for the whole forum and not just the pages? That is strange, there is nothing in the code that would cause that. And the 500 errors is more of a server issue. Anyways, is there any specific error pertaining to this logged in the error log?
Yes for the whole forum. No errors in admin and it only happens when I change the code in sub_pages.php to what to what you posted...weird! :o

Have you tried the code above to see if it happens to you?
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 26, 2022, 01:53:09 PM
Quote from: Doug Heffernan on January 26, 2022, 11:42:27 AMDo you mean that the 500 error you got was for the whole forum and not just the pages? That is strange, there is nothing in the code that would cause that. And the 500 errors is more of a server issue. Anyways, is there any specific error pertaining to this logged in the error log?
Yes for the whole forum. No errors in admin and it only happens when I change the code in sub_pages.php to what to what you posted...weird! :o

Have you tried the code above to see if it happens to you?

Yes, I did and I could not reproduce that.

Shades.

Quote from: Doug Heffernan on January 26, 2022, 04:21:23 PMYes, I did and I could not reproduce that.
Can you post me a modified subs-pages.php? I copy and pasted it just like you posted but maybe I'm doing something wrong. ???
ShadesWeb.com - Custom Logos - My Themes on SMF | My Themes on ShadesWeb
https://shadesweb.com

BikerHound.com - Sniffing out the road ahead
https://bikerhound.com

Dream as if you'll live forever; Live as if you'll die today. - James Dean

Doug Heffernan

Quote from: Shades. on January 26, 2022, 07:12:22 PM
Quote from: Doug Heffernan on January 26, 2022, 04:21:23 PMYes, I did and I could not reproduce that.
Can you post me a modified subs-pages.php? I copy and pasted it just like you posted but maybe I'm doing something wrong. ???

Yes, of course. Here you go:


Bugo

Russian translation

gevv

Hi,

Turkish translation
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Saftek

Clicking on Title to sort the created pages... I get a 403 error.

Doug Heffernan

Quote from: Saftek on April 16, 2022, 03:51:44 PMClicking on Title to sort the created pages... I get a 403 error.

This seems to be server related. Is there any other error pertaining this logged either in the forum error log or the server one? Can you post the url to the pages on your forum btw?

Saftek

Quote from: Doug Heffernan on April 16, 2022, 03:55:42 PM
Quote from: Saftek on April 16, 2022, 03:51:44 PMClicking on Title to sort the created pages... I get a 403 error.

This seems to be server related. Is there any other error pertaining this logged either in the forum error log or the server one? Can you post the url to the pages on your forum btw?


Https://www.vulcandrifterriders.com/forum/   - No errors in any log.


JessyKa

#28
Dear @Doug Heffernan
thanks a lot for this mod.
Please find attached the german translation as it fits for my forum. Maybe others can benefit from that.

Doug Heffernan

Quote from: JessyKa on April 20, 2022, 09:35:53 AMDear @Doug Heffernan
thanks a lot for this mod.
Please find attached the german translation as it fits for my forum. Maybe others can benefit from that.

Thank you for the translation @JessyKa. I will include it soon in the mod.

P.s. The file says: MembersOnlineToday.german.php, so I take it that you meant it for my other mod?

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

JessyKa

Corrected, thanks!

Doug Heffernan

Support for russian, turkish and german languages has been added thanks to @Bugo, @gevv and @JessyKa for their translations.

JessyKa

Hello @Doug Heffernan
Is there an option to allow member groups to add pages on their own?
I managed to allow to read the pages but adding is not possible, at least I do not progress in it...

Kindred

Quote from: JessyKa on April 20, 2022, 04:02:56 PMHello @Doug Heffernan
Is there an option to allow member groups to add pages on their own?
I managed to allow to read the pages but adding is not possible, at least I do not progress in it...

that would probably be a BAD idea, JessyKa...   If you want user content, then I suggest the SMF Articles mod instead. Allowing a full page potentially opens the door to bad actors to do something bad with html code -- while articles are limited to BBC, like posts.
Сл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."

JessyKa


Doug Heffernan

Quote from: JessyKa on April 20, 2022, 04:02:56 PMHello @Doug Heffernan
Is there an option to allow member groups to add pages on their own?
I managed to allow to read the pages but adding is not possible, at least I do not progress in it...

Only admins can add pages. If you want a more advanced set up where all members can add pages or other stuff, please see my Showcase mod.

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

dbh

Hi
How can i make readable for guest
thanks

btw
Nice mod

Doug Heffernan

Quote from: dbh on May 07, 2022, 07:59:26 AMHi
How can i make readable for guest
thanks

btw
Nice mod


It is group permission based. You must set the permissions for guests to view them.

dbh

 ???
Shame om me
So simple,Thanks for your reply
It's working

Doug Heffernan

Quote from: dbh on May 07, 2022, 08:29:49 AM???
Shame om me
So simple,Thanks for your reply
It's working

No problem. Glad to hear that it is working.

forumbteam

When installing the mod on the version of SMF 2.1.3 Released, the mod is successfully installed, but when you add pages, they are not visible on the forum

Doug Heffernan

Quote from: forumbteam on February 25, 2023, 09:00:40 AMWhen installing the mod on the version of SMF 2.1.3 Released, the mod is successfully installed, but when you add pages, they are not visible on the forum

Aren't they visible at all for everyone, or for certain groups?

forumbteam

#42
Quote
Quote from: Doug Heffernan on February 25, 2023, 12:07:11 PM
Quote from: forumbteam on February 25, 2023, 09:00:40 AMWhen installing the mod on the version of SMF 2.1.3 Released, the mod is successfully installed, but when you add pages, they are not visible on the forum

Aren't they visible at all for everyone, or for certain groups?

When creating a page, it exists only in the admin panel in the mod settings, if you want to view the page by a non-administrator, it is prohibited, in the mod settings there is no way to configure the output by groups, it is not possible to add the created page to any menu, the created page simply exists in the admin panel and is not configured where it is displayed and there is generally no possibility of displaying it anywhere

Doug Heffernan

Quote from: forumbteam on February 25, 2023, 12:40:55 PMif you want to view the page by a non-administrator, it is prohibited,

Have you read the description and seeing the screenshots at the mod 's download section/page? It looks like to me that you haven't set up the permissions accordingly for the groups that you want to view the pages.


forumbteam

Thanks, may have to try this

DeadMan...

@Doug Heffernan

Is there a way to change from ?action=pages;sa=view;id=1
To page's name? Like: ?action=pages;test
Or even: ?action=test
I tell it how I see it... Don't like it? Hit Alt+F4!

tech9

Does anybody know if this works in 2.1.4?

Diego Andrés

Quote from: tech9 on December 29, 2023, 10:14:25 PMDoes anybody know if this works in 2.1.4?

It uses hooks so very likely.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: