Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
[OzzModz] First Post Editable Indefinitely Per Usergroup Details »»
[OzzModz] First Post Editable Indefinitely Per Usergroup
Version: 1.0.2, by ozzy47 ozzy47 is offline
Developer Last Online: Dec 2021 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 07-11-2014 Last Update: 12-12-2014 Installs: 11
Uses Plugins
Translations  
No support by the author.

Another mod brought to you by,


This is a small mod that will allow admins to have selected usergroups bypass Time Limit editing their first posts in a thread.

It is a simple installation, just import the product XML, ozzmodz_editable_post

You can edit the options under the settings, [OzzModz] First Post Editable Indefinitely Settings

Note: This was originally done by Lynne, here First Post Editable Indefinitely but it did not have usergroup perms, and you had to edit each forum individually.

Should you want a specific usergroup to be able to edit all their posts indefinitely, use
[OzzModz] Disable Time Limit On Editing Of Posts By Usergroup

Complete Feature List
  • Option to disable the mod completely.
  • Option to set which usergroups this mod will affect.
  • Option to select which forums this mod affects.
Frequently Asked Questions.

Q. Why do I need such a thing, you ask?

A. Sometimes you want your users to be able to edit the first post in their thread indefinitely but still have a time limit on all other posts in the thread. This can be useful if you want your users to be able to constantly update their first thread with new information, or new releases to things way past the normal editing time limit. This modification will allow them to edit that first post indefinitely.


-------------------------------------------------------------------------------------------

If you like this mod please hit the button to the right ---->

Please remember to click the, button to the right if you installed the mod ---->

What does 'Marking As Installed' do ?

* It helps you to stay on top of updates - members who have installed modifications will be notified whenever new updates are available.

* For security issues - vbulletin.org will contact all members who have installed a modification whenever a security issue is brought to their attention.

* Marking a modification as installed also helps me know how many people are using my work, giving me extra incentive to provide more features and new modifications.

I appreciate the support!
-------------------------------------------------------------------------------------------

* History (Changelog) *
-------------------------
v1.0.0 (July 12, 2014)
- Initial public release.
v1.0.1 (December 12, 2014)
- Fixed a issue with it not working on some sites.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
RichieBoy67

Comments
  #12  
Old 08-11-2014, 07:15 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No it should work on all first posts.
Reply With Quote
  #13  
Old 08-11-2014, 09:18 PM
Grouper Grouper is offline
 
Join Date: Sep 2013
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I created a test user and tested this, it doesn't seem to enable the edit post button after the timeout of 15 minutes for the OP in the specified forums I enabled for in the settings. Seems to be the same issue civicf is having
Reply With Quote
  #14  
Old 08-11-2014, 09:24 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you could give that test user full admin privileges, and send me the info for that test user, I can try to debug it on your site.
Reply With Quote
  #15  
Old 08-11-2014, 11:36 PM
Grouper Grouper is offline
 
Join Date: Sep 2013
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did debugging and the issue lies with the
PHP Code:
is_member_of() 
code. It is returning false

Here is my debug code
PHP Code:
print_log('checking if active: '$ozzmodz_editable_post['active']); 
print_log('users: ' implode(',',$allowed_users)); 
print_log('forums: ' implode(',',$included_forums)); 
print_log('Post uid: ' $this->post['userid']. ' VB uid: ' vB::$vbulletin->userinfo['userid']); 
print_log('Post id: ' $this->post['postid'] . ' First PostID: ' $this->thread['firstpostid']); 
print_log('Forum in array: ' in_array($this->thread['forumid'], $included_forums)); 
print_log('is_member_of: ' is_member_of($vbulletin->userinfo$allowed_users)); 
output
PHP Code:
11.08.2014 19:37:03 testaccount checking if active1
11.08.2014 19
:37:03 testaccount users2,-1
11.08.2014 19
:37:03 testaccount forums61,66
11.08.2014 19
:37:03 testaccount Post uid334 VB uid334
11.08.2014 19
:37:03 testaccount Post id115630 First PostID115630
11.08.2014 19
:37:03 testaccount Forum in array: 1
11.08.2014 19
:37:03 testaccount is_member_of
11.08.2014 19:37:03 testaccount checking if active1
11.08.2014 19
:37:04 testaccount users2,-1
11.08.2014 19
:37:04 testaccount forums61,66
11.08.2014 19
:37:04 testaccount Post uid3 VB uid334
11.08.2014 19
:37:04 testaccount Post id115679 First PostID115630
11.08.2014 19
:37:04 testaccount Forum in array: 1
11.08.2014 19
:37:04 testaccount is_member_of
11.08.2014 19:37:04 testaccount checking if active1
11.08.2014 19
:37:04 testaccount users2,-1
11.08.2014 19
:37:04 testaccount forums61,66
11.08.2014 19
:37:04 testaccount Post uid63 VB uid334
11.08.2014 19
:37:04 testaccount Post id115681 First PostID115630
11.08.2014 19
:37:04 testaccount Forum in array: 1
11.08.2014 19
:37:04 testaccount is_member_of
11.08.2014 19:37:04 testaccount checking if active1
11.08.2014 19
:37:04 testaccount users2,-1
11.08.2014 19
:37:04 testaccount forums61,66
11.08.2014 19
:37:04 testaccount Post uid3649 VB uid334
11.08.2014 19
:37:04 testaccount Post id115682 First PostID115630
11.08.2014 19
:37:04 testaccount Forum in array: 1
11.08.2014 19
:37:04 testaccount is_member_of
11.08.2014 19:37:04 testaccount checking if active1
11.08.2014 19
:37:04 testaccount users2,-1
11.08.2014 19
:37:04 testaccount forums61,66
11.08.2014 19
:37:04 testaccount Post uid63 VB uid334
11.08.2014 19
:37:04 testaccount Post id115683 First PostID115630
11.08.2014 19
:37:04 testaccount Forum in array: 1
11.08.2014 19
:37:04 testaccount is_member_of
11.08.2014 19:37:05 testaccount checking if active1
11.08.2014 19
:37:05 testaccount users2,-1
11.08.2014 19
:37:05 testaccount forums61,66
11.08.2014 19
:37:05 testaccount Post uid334 VB uid334
11.08.2014 19
:37:05 testaccount Post id115687 First PostID115630
11.08.2014 19
:37:05 testaccount Forum in array: 1
11.08.2014 19
:37:05 testaccount is_member_of
also not sure why it has -1 as a group as I really only have Registered Users group active right now
Reply With Quote
  #16  
Old 08-11-2014, 11:57 PM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I'll check it out on my site when I get a chance. It may be tomorrow.
Reply With Quote
  #17  
Old 08-12-2014, 12:00 AM
Grouper Grouper is offline
 
Join Date: Sep 2013
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a need to have -1 in there?
Reply With Quote
  #18  
Old 08-12-2014, 12:07 AM
Grouper Grouper is offline
 
Join Date: Sep 2013
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed it

PHP Code:
$vbulletin->userinfo 
should be
PHP Code:
vB::$vbulletin->userinfo 
Reply With Quote
  #19  
Old 08-12-2014, 12:10 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, I have never used,

Code:
vB::$vbulletin->userinfo
Reply With Quote
  #20  
Old 08-12-2014, 12:23 AM
Grouper Grouper is offline
 
Join Date: Sep 2013
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Also you need to create a new hook ajax_start and add
PHP Code:
$ozzmodz_editable_post['active'] = $vbulletin->options['ozzmodz_editable_post_active']; //Is mod active  
$allowed_users explode(','$vbulletin->options['ozzmodz_editable_post_groups']); //Allowed users  
$included_forums explode(","$vbulletin->options['ozzmodz_editable_post_forums']); //Enabled forums  

    
global $threadinfo$postinfo$foruminfo$vbulletin;   
      
    if ((
$threadinfo['firstpostid'] == $postinfo['postid']) AND ($vbulletin->userinfo['userid'] == $postinfo['userid']) AND ($ozzmodz_editable_post['active']) AND (is_member_of(vB::$vbulletin->userinfo$allowed_users) AND in_array($forumid$included_forums)))    
    {  
        
$vbulletin->options['edittimelimit'] = 0;  
    } 
Reply With Quote
  #21  
Old 08-12-2014, 12:24 AM
Grouper Grouper is offline
 
Join Date: Sep 2013
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ozzy47 View Post
Hmmm, I have never used,

Code:
vB::$vbulletin->userinfo
yea... i don't know why $vbulletin->user info works on other things in that script but not is_member_of()... its weird. But i managed to get the plugin working with those edits I listed
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06333 seconds
  • Memory Usage 2,354KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete