[RC] Locked Post Indicator Button (LPIB)

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Ideas Centre
mickeyr
Registered User
Posts: 76
Joined: Wed Jun 03, 2009 8:55 pm

Re: [BETA] Locked Post Indicator Button (LPIB)

Post by mickeyr » Fri Jul 17, 2009 2:17 pm

I now receive the error:
Parse error: syntax error, unexpected '}' in /home/content/R/i/c/RichardRich1/html/testforum/cache/tpl_prosilver_viewtopic_body.html.php on line 232

I will now try and find the edit which has caused this.

mickeyr
Registered User
Posts: 76
Joined: Wed Jun 03, 2009 8:55 pm

Re: [BETA] Locked Post Indicator Button (LPIB)

Post by mickeyr » Fri Jul 17, 2009 4:25 pm

After installing and re-installing, the error is gone.
The closed Icon still does not appear. I have checked the page source and there is no mention of the closed icon there.

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [BETA] Locked Post Indicator Button (LPIB)

Post by lugsciath » Sat Jul 18, 2009 1:31 pm

I just had a first look on the board. There is no button (picture) and additional there is no link also. Hints are:
The switch in the viewtopic template has to be set.

"IF postrow.POST_LOCKED and not (S_ADMIN or S_MOD"

Remind the Endif Tag!

There is a possibility for a different structure of the template, so the Button/Switch where override by another mod (is there a fork -> if then elseif structure before the code?): Just set this code twice in both divisions of them.

If that hints are useless, just send me the code of your viewtopic.php and template.

Greetings

Uwe

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [BETA] Locked Post Indicator Button (LPIB)

Post by lugsciath » Sun Jul 19, 2009 10:24 pm

Okay, these files are checked and well edited. A general hint: If someone uses a other languagepath (like language/en or /de or imageset/en or /de) these paths has to be changed for copying/editing file(s)!

just checking more files.

Greetings

Uwe

mickeyr
Registered User
Posts: 76
Joined: Wed Jun 03, 2009 8:55 pm

Re: [BETA] Locked Post Indicator Button (LPIB)

Post by mickeyr » Mon Jul 20, 2009 2:45 pm

My paths are in english language
language/en
prosilver/imageset/en

Dont know where else to look.

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [BETA] Locked Post Indicator Button (LPIB)

Post by lugsciath » Mon Aug 03, 2009 1:10 pm

I try to login many times and surely get in with teamviewer, but i cant. I have no idea what failed ... so if somebody have/got the same problems please report it. If somebody have a solution and/or tip for that please feel free for helping us ;)

Question:

Did the button appear in the acp panel (templates -> images) ?

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [BETA] Locked Post Indicator Button (LPIB)

Post by lugsciath » Mon Sep 07, 2009 7:28 pm

Once more - the mod is still working at my board without any problem. Is there anybody out there and tested it or like to do (testing)?

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC] Locked Post Indicator Button (LPIB)

Post by lugsciath » Tue Nov 03, 2009 4:26 pm

Got no response, if this mod is working... someone interessed in? I put him in the RC state, because it is working on a livesystem since months.

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC] Locked Post Indicator Button (LPIB)

Post by lugsciath » Sat Jan 09, 2010 1:32 pm

Since i got no Response, i think it should work. Anybody out ther for real testing and debugging, if there any?

User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [RC] Locked Post Indicator Button (LPIB)

Post by muggins » Sat Jan 09, 2010 2:56 pm

I'll try it on my test board. Good idea, by the way. :)
Muggins

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC] Locked Post Indicator Button (LPIB)

Post by lugsciath » Sun Jan 10, 2010 10:28 pm

Thank you for testing, if anybody would like create a better / other designed button that would be great. I will replace it then in future releases.

User avatar
muggins
Registered User
Posts: 1183
Joined: Fri Feb 22, 2008 5:12 pm
Location: Texas
Name: Donovan
Contact:

Re: [RC] Locked Post Indicator Button (LPIB)

Post by muggins » Sun Jan 10, 2010 10:55 pm

I'll do my best to test it early this week, sir, but time is hideously hard to come by. :cry:

When I do so, I'll make a few images for buttons in the languages I can manage.. :?
Muggins

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC] Locked Post Indicator Button (LPIB)

Post by lugsciath » Tue Sep 14, 2010 9:14 am

No results? I need someone for testing it ! It´s a simple, harmless Mod, more a feature. Someone out there?

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [RC] Locked Post Indicator Button (LPIB)

Post by DoYouSpeakWak » Tue Sep 14, 2010 4:00 pm

Sure. I love the idea. So heres a report. Like the ones we make in the validation mod queue.

There was a few problems in the install.xml file. Problems that will result in this mod not working with automod and it might make newbies fail even doing it manually. Here are the bugs and fixes.

In
language/en/common.php
Find does not exist anymore.

Use this instead

Code: Select all

'TOO_LONG_YIM'					=> 'The Yahoo! Messenger name you entered is too long.',

In
styles/prosilver/template/viewtopic_body.html
Find does not exist anymore.

Use

Code: Select all

			<!-- IF postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE -->
				<ul class="profile-icons">

Instead

Addition problem:
This is wrong. The if codes doesnt work right. I get reported link when i click as admin.

Its this bit here

Code: Select all

					<!-- IF postrow.POST_LOCKED and not (S_ADMIN or S_MOD) --><li class="lock-icon"><a href="{postrow.U_REPORT}" title="{L_POST_LOCKED}"><span>{L_POST_LOCKED}</span></a></li>
                    <!-- ELSEIF postrow.POST_LOCKED and (S_ADMIN or S_MOD) -->
                    <li class="lock-icon"><a href="{postrow.U_EDIT}" title="{L_POST_LOCKED}"><span>{L_POST_LOCKED}</span></a></li>
                    <!-- ELSE -->
					<!-- IF postrow.U_EDIT --><li class="edit-icon"><a href="{postrow.U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li><!-- ENDIF -->
					<!-- ENDIF -->

Use this instead.

Code: Select all

					<!-- IF postrow.POST_LOCKED and not U_MCP -->
					<li class="lock-icon"><a href="{postrow.U_REPORT}" title="{L_POST_LOCKED}"><span>{L_POST_LOCKED}</span></a></li>
                    <!-- ELSEIF postrow.POST_LOCKED and U_MCP  -->
                    <li class="lock-icon"><a href="{postrow.U_EDIT}" title="{L_POST_LOCKED}"><span>{L_POST_LOCKED}</span></a></li>
                    <!-- ELSE -->
					<!-- IF postrow.U_EDIT --><li class="edit-icon"><a href="{postrow.U_EDIT}" title="{L_EDIT_POST}"><span>{L_EDIT_POST}</span></a></li><!-- ENDIF -->
					<!-- ENDIF -
This means that everybody exept guests can see that the post is closed/locked. And it also means that both the closed post button and the report post button are showed and has the same link.

Ideally. The button should only be shown to post author (with no link, remember if the post author see the post and its locked, they can press the report button and ask why.
And of course the mods. They should see the button and get a edit link when clicked.

Its posible to make a if code for post authros. Try to take a look at this mod. it does it with topic authors. Im sure the diffrence is easy to find and put into this mod.
Look way from everything else, but the if code, copy it, change it and put it into this mod. Then it will really be on its way.
http://www.phpbb.com/community/viewtopic.php?t=1804575


In
includes/acp/acp_styles.php
Find does not exist anymore.
Wrong find action.

Use

Code: Select all

			'icon_back_top', 'icon_contact_aim', 'icon_contact_email', 'icon_contact_icq', 'icon_contact_jabber', 'icon_contact_msnm', 'icon_contact_pm', 'icon_contact_yahoo', 'icon_contact_www', 'icon_post_delete', 'icon_post_edit', 'icon_post_info', 'icon_post_quote', 'icon_post_report', 'icon_user_online', 'icon_user_offline', 'icon_user_profile', 'icon_user_search', 'icon_user_warn', 'button_pm_forward', 'button_pm_new', 'button_pm_reply', 'button_topic_locked', 'button_topic_new', 'button_topic_reply',

Instead. AND the find action is wrong. This is a inline find and add after. Not a normal add after on next line.


In
viewtopic.php
Two finds, automod and most users will use the wrong one.

Sécond find has two matches. Its the second one, You should make a more precise find to avoid this.

This will work

Code: Select all

		'POST_DATE'			=> $user->format_date($row['post_time'], false, ($view == 'print') ? true : false),
		'POST_SUBJECT'		=> $row['post_subject'],


DIY.

THis part is not needed.

Code: Select all

Choose Imagesets (Prosilver)
Press Edit and choose "Posting locked[en]" from pull down, Press select.
Choose "Image Icon post locked.gif" vrom the pull down menu at bottom, press submit
The icon is already loaded in the imageset.cfg, and in the root.



Suggestions

Make a nicer button, Ask in the styles forum. Somebody usually can help.
change it from closed to locked. makes more sense imo.
Update modx
Make it work on automod. With the suggestions i have made here it should be easy.


Good luck with this mod. ill be happy to test future versions.
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

lugsciath
Registered User
Posts: 316
Joined: Tue Oct 02, 2007 11:12 am

Re: [RC] Locked Post Indicator Button (LPIB)

Post by lugsciath » Wed Sep 15, 2010 7:26 am

Many thanks to you, Doyouspeakwak!

I will edit the modx and mod immediately to make it work. If someone could make the changes for the button(s), i would be happy ;) . Next update [RC2] into the next 2 weeks.

Edit: Demourl refreshed, Testuseraccount active. The Demoboard is in german language, feel free to change the testuseraccount change to english.

Locked

Return to “[3.0.x] MODs in Development”