phpBBHacks.com - Unlimited edit of 1st topic post in a single forum
Get Photoshop help and share your work at PhotoshopForums.com
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 3 Hack Requests and Development
 See a User Guidelines violation? Please contact us.
Author Message

dukof1
New User

Joined: 15 Jul 2010
Posts: 2

PostPosted: July 15th 2010, 5:37 pm    Post subject: Unlimited edit of 1st topic post in a single forum Reply with quote

Hi!

I want to set unlimited edit time for all 1st posts in any topic of only a single forum.

I have made up one suggestion below, but I don't know if this code is correct or will work, or if it's safe. As I have no experience with php coding language. I would really appreciate some help on how to make this work.


Suggestion:

I was planning to hard-code in the forum_id for the one forum where I want this feature. How would I get this "forum_id"? In the link it says "f=45", is that simply the forum_id? And could I just put that into my code directly?

Are there other files or places I would need to modify..?

posting.php, Find:
// Can we edit this post ... if we're a moderator with rights then always yes

Change below:
Code:
// Begin : Unlimited edit time if first post in specific forum
if ($post_id == $post_data['topic_first_post_id'] && $forum_id == <hard-coded?> )
{
   $config['edit_time'] = 0;
}
// End


viewtopic.php, Find:
$postrow = array(

Change above:
Code:
// Begin : Unlimited edit time of first post in topic
if ($topic_data['topic_first_post_id'] == $row['post_id'] && $forum_id == <hard-coded?> )
{
   $config['edit_time'] = 0;
}
// End
Back to top
View user's profile Send private message

Thoul
VIP

Joined: 30 Jul 2002
Posts: 18040
Location: USA

PostPosted: July 15th 2010, 10:31 pm    Post subject: Reply with quote

For viewtopic.php, you would need to place the code higher in the file. Put it before this line:
Code:
   $edit_allowed = ($user->data['is_registered'] && ($auth->acl_get('m_edit', $forum_id) || (


Other than that little change, it looks like what you have should work. You have a good grasp of all of it and no other edits should be needed.

If a link says "f=45", then than number is the forum_id. So you should use 45 in the code, not f=45.
_________________
Fringes of Algo - Phantasy Star Community
TV Blitz Forums - Television Discussion Community
phpBB Smith: Modifications

70+ Listings @ phpBBHacks.com
Back to top
View user's profile Send private message Visit poster's website

dukof1
New User

Joined: 15 Jul 2010
Posts: 2

PostPosted: July 16th 2010, 12:31 am    Post subject: Reply with quote

Thoul,

Thanks for your response! Good to have some confirmation. I will then try it out on my forum and see..

Yes I meant 45, poor writing by me

cheers!
Back to top
View user's profile Send private message

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: July 23rd 2010, 6:43 pm    Post subject: Reply with quote

Nice work, Jeremy.

And welcome, dukof1. Did that do the trick for you?

Thanks,

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 3 Hack Requests and Development All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.