Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Doug Heffernan on January 25, 2022, 02:08:09 PM

Title: Smf Pages System
Post by: Doug Heffernan on January 25, 2022, 02:08:09 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4304)

This mod will add a page system to your forum.
Title: Re: Smf Pages System
Post by: Shambles on January 25, 2022, 02:23:57 PM
It won't add it to my forum :P   (2.0.19)
Title: Re: Smf Pages System
Post by: Mick. on January 25, 2022, 02:28:42 PM
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
Title: Re: Smf Pages System
Post by: 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
Title: Re: Smf Pages System
Post by: Mick. on January 25, 2022, 02:31:56 PM
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.
Title: Re: Smf Pages System
Post by: -Rock Lee- on January 25, 2022, 03:18:56 PM
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!
Title: Re: Smf Pages System
Post by: Shades. on January 25, 2022, 04:12:18 PM
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.
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 25, 2022, 04:32:44 PM
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?
Title: Re: Smf Pages System
Post by: Shades. on January 25, 2022, 04:40:49 PM
Cool works great! I like it! 8)
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 25, 2022, 04:43:08 PM
Quote from: Shades. on January 25, 2022, 04:40:49 PMCool works great! I like it! 8)

Glad to hear that :)
Title: Re: Smf Pages System
Post by: Shades. on January 25, 2022, 04:51:19 PM
How do I remove "Pages" from the top menu bar? O:)
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 25, 2022, 04:58:42 PM
Quote from: Shades. on January 25, 2022, 04:51:19 PMfrom the top menu bar?

Do you mean to remove the menu button altogether?
Title: Re: Smf Pages System
Post by: Shades. on January 25, 2022, 05:01:00 PM
Yes :)

Since there are no per page permissions I'd like to make only certain pages visible in the menu via ultimate menu mod. ;)
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 25, 2022, 05:08:05 PM
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;
}
Title: Re: Smf Pages System
Post by: Diego Andrés on January 25, 2022, 05:09:31 PM
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;
}
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 25, 2022, 05:12:41 PM
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 :)
Title: Re: Smf Pages System
Post by: Shades. on January 25, 2022, 05:36:25 PM
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
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 26, 2022, 11:42:27 AM
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?
Title: Re: Smf Pages System
Post by: 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?
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 26, 2022, 04:21:23 PM
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.
Title: Re: Smf Pages System
Post by: 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. ???
Title: Re: Smf Pages System
Post by: Doug Heffernan on January 27, 2022, 06:32:32 AM
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:

Title: Re: Smf Pages System
Post by: Bugo on February 04, 2022, 01:44:44 AM
Russian translation
Title: Re: Smf Pages System
Post by: gevv on March 04, 2022, 11:57:23 AM
Hi,

Turkish translation
Title: Re: Smf Pages System
Post by: Saftek on April 16, 2022, 03:51:44 PM
Clicking on Title to sort the created pages... I get a 403 error.
Title: Re: Smf Pages System
Post by: 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?
Title: Re: Smf Pages System
Post by: Saftek on April 16, 2022, 04:05:19 PM
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.
Title: Re: Smf Pages System
Post by: Doug Heffernan on April 16, 2022, 04:47:32 PM
Quote from: Saftek on April 16, 2022, 04:05:19 PMHttps://www.vulcandrifterriders.com/forum/   - No errors in any log.

I can not access pages as a guest.
Title: Re: Smf Pages System
Post by: JessyKa on April 20, 2022, 09:35:53 AM
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.
Title: Re: Smf Pages System
Post by: Doug Heffernan on April 20, 2022, 09:40:15 AM
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
Title: Re: Smf Pages System
Post by: JessyKa on April 20, 2022, 09:56:09 AM
Corrected, thanks!
Title: Re: Smf Pages System
Post by: Doug Heffernan on April 20, 2022, 10:21:19 AM
Support for russian, turkish and german languages has been added thanks to @Bugo, @gevv and @JessyKa for their translations.
Title: Re: Smf Pages System
Post by: JessyKa on April 20, 2022, 04:02:56 PM
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...
Title: Re: Smf Pages System
Post by: Kindred on April 20, 2022, 04:22:21 PM
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.
Title: Re: Smf Pages System
Post by: JessyKa on April 20, 2022, 04:35:04 PM
@Kindred
Good point!
thx
Title: Re: Smf Pages System
Post by: Doug Heffernan on April 20, 2022, 04:55:04 PM
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
Title: Re: Smf Pages System
Post by: dbh on May 07, 2022, 07:59:26 AM
Hi
How can i make readable for guest
thanks

btw
Nice mod
Title: Re: Smf Pages System
Post by: Doug Heffernan on May 07, 2022, 08:23:47 AM
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.
Title: Re: Smf Pages System
Post by: dbh on May 07, 2022, 08:29:49 AM
 ???
Shame om me
So simple,Thanks for your reply
It's working
Title: Re: Smf Pages System
Post by: Doug Heffernan on May 07, 2022, 08:30:39 AM
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.
Title: Re: Smf Pages System
Post by: forumbteam on February 25, 2023, 09:00:40 AM
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
Title: Re: Smf Pages System
Post by: 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?
Title: Re: Smf Pages System
Post by: forumbteam on February 25, 2023, 12:40:55 PM
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
Title: Re: Smf Pages System
Post by: Doug Heffernan on February 25, 2023, 02:06:38 PM
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.

Title: Re: Smf Pages System
Post by: forumbteam on February 26, 2023, 01:08:55 AM
Thanks, may have to try this
Title: Re: Smf Pages System
Post by: DeadMan... on March 20, 2023, 08:20:47 PM
@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
Title: Re: Smf Pages System
Post by: tech9 on December 29, 2023, 10:14:25 PM
Does anybody know if this works in 2.1.4?
Title: Re: Smf Pages System
Post by: Diego Andrés on December 29, 2023, 11:40:39 PM
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.