Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Rumpa on November 13, 2022, 02:11:44 PM

Title: GuestBBC Button
Post by: Rumpa on November 13, 2022, 02:11:44 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4350)

About

This modification is for guset visitor only. Members can create or post for guest.Topic or post creater can not see this content only guest can view it.


Best part of this mod put a "guest" button after "justify" button

tag use for this modification [guest]guest content[/guest]

Version

V1.3 for SMF 2.1.3
Solve the issue of error log

V1.2 for SMF 2.1.2
Remove little bug from the package info file thanks to Doug Heffernan

Language added
V1.1 for SMF 2.1.2
(Spanish language added credit goes to -Rock Lee-

Initial Release
V1.0 for SMF 2.1.2

Author

Rumpa
Title: Re: GuestBBC Button
Post by: -Rock Lee- on November 13, 2022, 08:20:07 PM
It may be that fatigue can or I don't fully understand what it points to... can you leave a screenshot to understand it better?


Regards!
Title: Re: GuestBBC Button
Post by: Rumpa on November 13, 2022, 09:00:25 PM
^If you want to show a notice topic or post to your "guest" visitor only then this modification is for you. It's totally hide the topic content from registered members.
Title: Re: GuestBBC Button
Post by: Rumpa on November 13, 2022, 09:12:13 PM
Here are the screen shots
As a member you see this
(https://i.postimg.cc/PfRSxrcH/Screenshot-20221114-073451.jpg)

As a guest you see this
(https://i.postimg.cc/654YGxJv/Screenshot-20221114-073533.jpg)
Title: Re: GuestBBC Button
Post by: -Rock Lee- on November 14, 2022, 07:47:31 PM
I already understand this, it can be very useful for a forum I have for my university, great job ;D, and I also leave you the file translated into Spanish.


REgards!
Title: Re: GuestBBC Button
Post by: Rumpa on November 15, 2022, 05:34:16 AM
Spanish language added thanks to @-Rock Lee-
Title: Re: GuestBBC Button
Post by: stefanop039 on November 18, 2022, 10:06:55 AM
Hello, I installed this mod but it gives me an error in the error log, how can I fix?
Thanks for your attention

(https://i.postimg.cc/Hnyw24PN/Immagine-2022-11-18-160044.png)
(https://i.postimg.cc/BZLB44QC/Immagine-2022-11-18-160151.png)
Title: Re: GuestBBC Button
Post by: Kindred on November 18, 2022, 10:21:48 AM
the path is wrong....   there's and extra "/sourcedir/" in that path, which is why the code can't find the file.

Open your database in phpmyadmin
go to smf_settings (where smf_ is the actual prefix used by your installation)
search for %integrat%
find the reference for Subs-GuestBBC.php and correct the path.
Title: Re: GuestBBC Button
Post by: stefanop039 on November 18, 2022, 11:13:26 AM
Quote from: Kindred on November 18, 2022, 10:21:48 AMthe path is wrong....  there's and extra "/sourcedir/" in that path, which is why the code can't find the file.

Open your database in phpmyadmin
go to smf_settings (where smf_ is the actual prefix used by your installation)
search for %integrat%
find the reference for Subs-GuestBBC.php and correct the path.
Thanks for the quick answer I opened the smf_settings table but I didn't find any reference to Subs-GuestBBC.php see images.
thank you

(https://i.postimg.cc/W3xXCDnq/Immagine-2022-11-18-170615.png)
(https://i.postimg.cc/Y0gbHpnn/Immagine-2022-11-18-170640.png)
Title: Re: GuestBBC Button
Post by: stefanop039 on November 18, 2022, 03:23:54 PM
Quote from: Kindred on November 18, 2022, 10:21:48 AMthe path is wrong....   there's and extra "/sourcedir/" in that path, which is why the code can't find the file.

Open your database in phpmyadmin
go to smf_settings (where smf_ is the actual prefix used by your installation)
search for %integrat%
find the reference for Subs-GuestBBC.php and correct the path.
I uninstalled it but it keeps making errors, please further help
thank you
Title: Re: GuestBBC Button
Post by: Kindred on November 18, 2022, 03:40:30 PM
apparently, your uninstall did not remove the hooks....
Title: Re: GuestBBC Button
Post by: Doug Heffernan on November 18, 2022, 04:08:03 PM
The reason that the hook was not removed properly upon uninstallation is because of a bug. At the package-info.xml file the following code:

<hook hook="integrate_bbc_buttons" function="GuestBBBC_buttons" file="$sourcedir/Subs-GuestBBC.php" reverse="true" />
should be:

<hook hook="integrate_bbc_buttons" function="GuestBBC_buttons" file="$sourcedir/Subs-GuestBBC.php" reverse="true" />
You can make the aforementioned changes, repackage the mod and then install it and uninstall it again. That should do it.

 
Title: Re: GuestBBC Button
Post by: Rumpa on November 19, 2022, 01:30:48 AM
Modifications has been updated
Title: Re: GuestBBC Button
Post by: stefanop039 on November 19, 2022, 01:46:38 AM
Quote from: Doug Heffernan on November 18, 2022, 04:08:03 PMThe reason that the hook was not removed properly upon uninstallation is because of a bug. At the package-info.xml file the following code:

<hook hook="integrate_bbc_buttons" function="GuestBBBC_buttons" file="$sourcedir/Subs-GuestBBC.php" reverse="true" />
should be:

<hook hook="integrate_bbc_buttons" function="GuestBBC_buttons" file="$sourcedir/Subs-GuestBBC.php" reverse="true" />
You can make the aforementioned changes, repackage the mod and then install it and uninstall it again. That should do it.

 
a thousand thanks
Title: Re: GuestBBC Button
Post by: Doug Heffernan on November 19, 2022, 06:02:27 AM
Quote from: stefanop039 on November 19, 2022, 01:46:38 AMa thousand thanks

No problem.
Title: Re: GuestBBC Button
Post by: Steve on November 20, 2022, 06:30:29 PM
Quote from: Rumpa on November 19, 2022, 01:30:48 AMModifications has been updated
Thanks for updating it @Rumpa.