EVENT tag used in this forum

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Anti-Spam Guide
Matt_S
Registered User
Posts: 22
Joined: Fri May 02, 2003 12:33 am
Location: Stanwood, WA
Contact:

EVENT tag used in this forum

Post by Matt_S » Fri Nov 01, 2013 3:39 pm

How are the [EVENT] tags used in this forum implemented? Is that a mod or just a matter of setting it up in the control panel? Can someone point me in the right direction? Thanks

I'm specifically referring to the process described in this thread, where putting [EVENT] in the subject causes an icon to appear in the subject.
viewtopic.php?f=64&t=1237515

User avatar
Jessica
Former Team Member
Posts: 4341
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: EVENT tag used in this forum

Post by Jessica » Fri Nov 01, 2013 7:37 pm

Matt_S wrote:How are the [EVENT] tags used in this forum implemented? Is that a mod or just a matter of setting it up in the control panel? Can someone point me in the right direction? Thanks

I'm specifically referring to the process described in this thread, where putting [EVENT] in the subject causes an icon to appear in the subject.
viewtopic.php?f=64&t=1237515
Seems to be a custom mod that hasn't been released on phpBB.com...you can still install a mod that adds prefixes, though (and the prefix can be an image): https://www.phpbb.com/customise/db/mod/qte/
Please do not PM me for support unless it is absolutely necessary
Pro-choice, Atheist, Pro-LGBT rights

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein

Matt_S
Registered User
Posts: 22
Joined: Fri May 02, 2003 12:33 am
Location: Stanwood, WA
Contact:

Re: EVENT tag used in this forum

Post by Matt_S » Fri Nov 01, 2013 8:40 pm

Jessica wrote: Seems to be a custom mod that hasn't been released on phpBB.com...you can still install a mod that adds prefixes, though (and the prefix can be an image): https://www.phpbb.com/customise/db/mod/qte/
That's what I was afraid of. Hopefully someone here can shed some light on it. I've looked at the mod you linked to, but it seems like a bit of overkill for what I want. The one used here seems simple and right up my alley. I'm a little gun shy about applying mods that may or may not be supported in future versions.

User avatar
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: EVENT tag used in this forum

Post by Pony99CA » Fri Nov 01, 2013 8:58 pm

You'd think that if the Web site team found it important enough to MOD here, it would have been added to phpBB 3.1, wouldn't you? As far as I know, though, it hasn't been.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 23722
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: EVENT tag used in this forum

Post by Paul » Sat Nov 02, 2013 1:17 pm

Pony99CA wrote:You'd think that if the Web site team found it important enough to MOD here, it would have been added to phpBB 3.1, wouldn't you? As far as I know, though, it hasn't been.

Steve
Without looking at the source, it is probably hacked into view forum.php with a str_replace for the topic title. As far I know it won't be in 3.1, but iam not a developer.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29189
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: EVENT tag used in this forum

Post by Marshalrusty » Sat Nov 02, 2013 10:02 pm

Pony99CA wrote:You'd think that if the Web site team found it important enough to MOD here, it would have been added to phpBB 3.1, wouldn't you? As far as I know, though, it hasn't been.
Why? This forum, like most, has some very specific requirements that do not extend beyond the specific usecase. If we optimized phpBB for the community on phpBB.com, it would be quite different from what we have, for example not requiring multiple languages or database systems. I don't see any reason why we cannot utilize MODs just like any other community.

If anything, this accentuates the reasoning behind why we are working toward open sourcing the website code. In that case, you could just look this up in the repo.


The code is really trivial, by the way.

Open phpBB/styles/prosilver/template/viewforum_body.html
Find:

Code: Select all

<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
Replace with:

Code: Select all

<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_IS_EVENT --><img src="{S_THEME_PATH}/images/community/event.png" style="margin-bottom:-2px; valign:bottom" />  <!-- ENDIF -->{topicrow.TOPIC_TITLE}</a>
Open phpBB/viewforum.php
Find:

Code: Select all

                
$topic_forum_id = ($row['forum_id']) ? (int) $row['forum_id'] : $forum_id;
Before, add:

Code: Select all

                // Replace "[EVENT]" with an events image
                $is_event = false;

                if (strtolower(substr($row['topic_title'], 0, 7)) == '[event]')
                {
                        $row['topic_title'] = substr($row['topic_title'], 7);
                        $is_event = true;
                }
Find:

Code: Select all

                        'S_TOPIC_MOVED'                        => ($row['topic_status'] == ITEM_MOVED) ? true : false,
After, add:

Code: Select all

                        'S_IS_EVENT'                        => ($is_event) ? true : false,
Open phpBB/search.php
Find:

Code: Select all

                        $template->assign_block_vars('searchresults', array_merge($tpl_ary, array(
                                'FORUM_ID'                        => $forum_id,
Before, add:

Code: Select all

                        // Replace "[EVENT]" with an events image
                        $is_event = false;

                        if (strtolower(substr($topic_title, 0, 7)) == '[event]')
                        {
                                $topic_title = substr($topic_title, 7);
                                $is_event = true;
                        }
Find:

Code: Select all

                                'U_VIEW_TOPIC'                => $view_topic_url,
Before, add:

Code: Select all

                                'S_IS_EVENT'                => $is_event,
And you can get the image here: https://www.phpbb.com/theme/images/community/event.png

You may consider the code in this post, and that image, released under the GNU GPL v2.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

Matt_S
Registered User
Posts: 22
Joined: Fri May 02, 2003 12:33 am
Location: Stanwood, WA
Contact:

Re: EVENT tag used in this forum

Post by Matt_S » Sun Nov 03, 2013 1:00 am

Outstanding! Thank you!

User avatar
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: EVENT tag used in this forum

Post by Pony99CA » Tue Nov 05, 2013 3:00 am

Marshalrusty wrote:
Pony99CA wrote:You'd think that if the Web site team found it important enough to MOD here, it would have been added to phpBB 3.1, wouldn't you? As far as I know, though, it hasn't been.
Why? This forum, like most, has some very specific requirements that do not extend beyond the specific usecase. If we optimized phpBB for the community on phpBB.com, it would be quite different from what we have, for example not requiring multiple languages or database systems.
Why? Because I've seen numerous requests for Topic Prefixes throughout the years. If phpBB.com decides that it has the need for one, why not build it into the core so that everybody can take advantage of it?

I'm not asking for ancillary things (like the Ideas or Knowledge Base areas), just things that make sense for boards.
Marshalrusty wrote:I don't see any reason why we cannot utilize MODs just like any other community.
I ithought that one of the goals here was to keep the phpBB.com board as close to standard phpBB as possible, only using the ACP to tweak things, so that users got a "realistic" view of what the software did. I know this uses Sphinx for searching and has a custom style (and some changes for the rotating Scam Alert area), but my understanding was that there weren't many MODs. The more MODs you add, the more users will wonder "How do I turn that on in my board". ;)

But thanks for posting the code. :D

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29189
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: EVENT tag used in this forum

Post by Marshalrusty » Tue Nov 05, 2013 7:07 pm

Pony99CA wrote:
Marshalrusty wrote:Why? This forum, like most, has some very specific requirements that do not extend beyond the specific usecase. If we optimized phpBB for the community on phpBB.com, it would be quite different from what we have, for example not requiring multiple languages or database systems.
Why? Because I've seen numerous requests for Topic Prefixes throughout the years. If phpBB.com decides that it has the need for one, why not build it into the core so that everybody can take advantage of it?
A "few requests over the years" is not enough to justify bloating core. The phpBB software should be secure, lean, and modular. Each administrator can them customize on top of that base to personalize their community. With the new extensions system, most additions like this should become drop-in extensions that can be toggled on and off at will.
Pony99CA wrote:
Marshalrusty wrote:I don't see any reason why we cannot utilize MODs just like any other community.
I ithought that one of the goals here was to keep the phpBB.com board as close to standard phpBB as possible, only using the ACP to tweak things, so that users got a "realistic" view of what the software did. I know this uses Sphinx for searching and has a custom style (and some changes for the rotating Scam Alert area), but my understanding was that there weren't many MODs. The more MODs you add, the more users will wonder "How do I turn that on in my board". ;)
It's true that the "keep phpBB.com pure" idea was a guideline of some previous people involved with the project, but I have never seen the logic in this. Firstly, the entire website is built on top of phpBB, which may just be the biggest customization in existence. Secondly, phpBB.com/community is a specific usecase of the software, meaning that, like most other implementations, some customization will be desired. There are actually quite a number of changes that have made it in over the years, although most of them are not public. Most of them would be unhelpful to maybe 99% of phpBB forums. If someone wants to see phpBB as it comes out of the box, we have a demo for that. phpBB.com/community is one example of how well phpBB can be customized to serve a specific purpose.
Pony99CA wrote:But thanks for posting the code. :D
Anytime :)

When we're a bit closer to RC, I can expand on this a bit and turn it into a proper extension for 3.1.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

Matt_S
Registered User
Posts: 22
Joined: Fri May 02, 2003 12:33 am
Location: Stanwood, WA
Contact:

Re: EVENT tag used in this forum

Post by Matt_S » Tue Nov 05, 2013 7:33 pm

Marshalrusty wrote: When we're a bit closer to RC, I can expand on this a bit and turn it into a proper extension for 3.1.
That would be great. I would love to see this expanded in an official release.

User avatar
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: EVENT tag used in this forum

Post by Pony99CA » Wed Nov 06, 2013 2:21 am

Marshalrusty wrote:
Pony99CA wrote:
Marshalrusty wrote:Why? This forum, like most, has some very specific requirements that do not extend beyond the specific usecase. If we optimized phpBB for the community on phpBB.com, it would be quite different from what we have, for example not requiring multiple languages or database systems.
Why? Because I've seen numerous requests for Topic Prefixes throughout the years. If phpBB.com decides that it has the need for one, why not build it into the core so that everybody can take advantage of it?
A "few requests over the years" is not enough to justify bloating core. The phpBB software should be secure, lean, and modular. Each administrator can them customize on top of that base to personalize their community. With the new extensions system, most additions like this should become drop-in extensions that can be toggled on and off at will.
"A few" was just a guess; I didn't go back and look at how many. The point was that it was enough that it made an impression. But see the next paragraph....
Marshalrusty wrote:When we're a bit closer to RC, I can expand on this a bit and turn it into a proper extension for 3.1.
That would be good. I hope that it will be an officially supported extension (in others words, maintained by the phpBB team as phpBB moves on). You're going to have to maintain it anyway to keep the function in the board, so why not guarantee support?

In fact, if you really wanted phpBB to be "lean", you'd strip out some of the lesser used features (Jabber support, for example) and make them officially-supported extensions, too. (And, as I stated in the linked topic, maybe have a phpBB 3.0 compatibility pack of extensions.)

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29189
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Re: EVENT tag used in this forum

Post by Marshalrusty » Wed Nov 06, 2013 7:59 am

Pony99CA wrote:In fact, if you really wanted phpBB to be "lean", you'd strip out some of the lesser used features (Jabber support, for example) and make them officially-supported extensions, too. (And, as I stated in the linked topic, maybe have a phpBB 3.0 compatibility pack of extensions.)
The splitting off of lesser-used features into extensions as part of a general cleanup of core has come up on multiple occasions and it will very likely happen in future major releases. With the new extensions system launching in 3.1, it becomes very attractive to remove bloat when it is spotted. Look out for RFCs on this topic on area51.

It should be noted that popularity is not the only metric in deciding what makes it into phpBB. For example, we would never get rid of the internationalization and localization options, regardless of the numbers. The same is true of support for certain RDBMSs. As far as something like Jabber support, the ideal case would be a totally generalized notification system with plugin support, so you could get your messages wherever you like. The new notifications system in 3.1 is a step in this direction.
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs

User avatar
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: EVENT tag used in this forum

Post by Pony99CA » Thu Nov 07, 2013 2:32 am

Marshalrusty wrote:
Pony99CA wrote:In fact, if you really wanted phpBB to be "lean", you'd strip out some of the lesser used features (Jabber support, for example) and make them officially-supported extensions, too. (And, as I stated in the linked topic, maybe have a phpBB 3.0 compatibility pack of extensions.)
The splitting off of lesser-used features into extensions as part of a general cleanup of core has come up on multiple occasions and it will very likely happen in future major releases. With the new extensions system launching in 3.1, it becomes very attractive to remove bloat when it is spotted. Look out for RFCs on this topic on area51.
Cool. I had just asked that question in the topic announcing the Extensions Development Team.

I'm also glad that they'll create officially-supported extensions as I mentioned above. Maybe Topic Prefixes could be one of the first officially-supported extensions (after the Board Rules extension). ;)
Marshalrusty wrote:It should be noted that popularity is not the only metric in deciding what makes it into phpBB. For example, we would never get rid of the internationalization and localization options, regardless of the numbers. The same is true of support for certain RDBMSs.
Of course, but getting rid of something is a lot different than adding something.
Marshalrusty wrote:As far as something like Jabber support, the ideal case would be a totally generalized notification system with plugin support, so you could get your messages wherever you like. The new notifications system in 3.1 is a step in this direction.
Agreed. I've suggested having a plug-in system so that people could potentially add things like SMS or Twitter notifications, too.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

Matt_S
Registered User
Posts: 22
Joined: Fri May 02, 2003 12:33 am
Location: Stanwood, WA
Contact:

Re: EVENT tag used in this forum

Post by Matt_S » Thu Nov 07, 2013 7:34 pm

I applied this mod and have it working, however I have a question.

I'm using the Subsilver2 Style, and I had to change {S_THEME_PATH} to {T_THEME_PATH} . I couldn't find any references to {S_THEME_PATH} in the Prosilver style either. Did I make the correct change? I want to avoid any unintended consequences.

User avatar
nextgen
Registered User
Posts: 2271
Joined: Mon Jul 26, 2010 10:58 pm
Location: Guatemala
Name: Melvin García
Contact:

Re: EVENT tag used in this forum

Post by nextgen » Thu Nov 07, 2013 8:52 pm

Matt_S wrote:I applied this mod and have it working, however I have a question.

I'm using the Subsilver2 Style, and I had to change {S_THEME_PATH} to {T_THEME_PATH} . I couldn't find any references to {S_THEME_PATH} in the Prosilver style either. Did I make the correct change? I want to avoid any unintended consequences.
{S_THEME_PATH} is a custom path from the phpBB Website, in your case it has to be {T_THEME_PATH}
メルビン・ガルシア • XeronixMy active styles for phpBBphpBB Argentina - Soporte en español🇦🇷

Please do NOT contact for support via PM or email.

Post Reply

Return to “phpBB Discussion”

Who is online

Users browsing this forum: No registered users and 20 guests

cron