vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - specify how usergroups see postings (https://vborg.vbsupport.ru/showthread.php?t=231208)

tyfoon 12-25-2009 10:00 PM

specify how usergroups see postings
 
1 Attachment(s)
This mods shows only partial posting to guests

Currently shows only the 50 first char. of the message. and then puts the link to the register.php.

ver. 0 alpha 1
configurable from acp
settings : active or not
length guests can view (char length or percentage of posting)
register url and message

Ver 1.0.0
Forum (in the edit forum options) can be individualy selected or can be globaly enabled
Debug mode for admins for testing
Show a percentage of a posting is also an option.



Ver 1.0.0.3
also possible to hide the post & edit time&date
Hide printthread for usergroups
hide archive for usergroups
hide images
hide http links
hide quotes
remove incomlite http links and quotes when in guest limit view
bug with settingsgroup fixed
to install : uninstall the previous version and instal the new one

ver. 1.0.0.33 Warning bitfield xml file updated
added following features
hide color, font, textsize in postings so the usergoups sees only the posting in the default text




Todo : check conflict in quotes ..
make it also work in het cms

tyfoon 12-26-2009 06:29 AM

Reserved

TalkVirginia 12-26-2009 08:16 AM

Looks great! Keep up the good work. One suggestion you may want to do is to add a break after the limited portion of the post and the register message so that it looks something like this:

<limited message>
<register message>

Another idea (which I imagine you have already thought of..) is to allow for a custom register message to be set in the admincp.

Just a thought. :)

Edit: Additional thoughts to anyone testing this. You will need to go into the post hide plugin and modify the url to point to your register.php file. I also added a "< br />" before the register message.

Edit: I'm noticing that posts that have quotes in them, the message and the register message with link is not displayed. Only the word "register" is displayed with no link. I tried relocating the html in the register message as follows:

PHP Code:


if (!$vbulletin->userinfo['userid'] )
    { 
$post['message'] = (substr($post['message'], 050)). '<br/>Please <a href="\site\register.php" type="text/html">Register</a> to see the whole posting.';


...and everything after the '>' in the beginning href is displayed. It looks like something in the quote rendering is conflicting with this.

If I run across any other observations, I'll post them as I find them.

hth,
Jim

tazattitude 12-26-2009 10:56 AM

Great start!
I changed the 50 to 150
And added a break before the message.

Installed and voted

Delilahs 12-26-2009 12:11 PM

In the product.xml file, I've changed some to;

PHP Code:

['userid'] )

    { 
$post['message'] = (substr($post['message'], 0100)). '......Please register to see the whole post,<br> </br>  you can register by clicking the link <a href="/forum/register.php" type="text/html">Register here</a>';

}]]></
phpcode

It now directs to my register page no trouble at all, nice mod.

Thanks

MikeHolohan 12-26-2009 03:44 PM

this is an excellent idea, will wait until it is working properly first tho...

Charlie98902 12-26-2009 04:08 PM

Tagged!

Delilahs 12-26-2009 04:52 PM

It's active on my site. for those of you who want to have a look at it in action.

Charlie98902 12-26-2009 05:00 PM

Thanks Delilahs I was thinking this mod only showed the first post and limited at that but it seems not?

Delilahs 12-26-2009 05:26 PM

It does the whole thread which is superb, I also have the limited viewing system in place, set at 8 posts, but this gives me the option to now turn off the limited viewing system.

Since my last post, I've tweaked it a bit more so it looks a bit more presentable to guests.

Open up the product.xml file with a text editor and replace with the following to get the same result

PHP Code:

<?xml version="1.0" encoding="ISO-8859-1"?>



<product productid="show_partial_guests" active="1">
    <title>Show partial post guests</title>
    <description>Shows only partial posting to guests</description>
    <version>0 alpha</version>
    <url />
    <versioncheckurl />
    <apm_releasedate>0</apm_releasedate>
    <apm_author />
    <apm_relatedurl />
    <apm_extrainfo />
    <apm_extraedit />
    <dependencies>
    </dependencies>
    <codes>
    </codes>
    <templates>
    </templates>
    <stylevardfns>
    </stylevardfns>
    <stylevars>
    </stylevars>
    <plugins>
        <plugin active="1" executionorder="5">
            <title>post hide</title>
            <hookname>postbit_display_complete</hookname>
            <phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )

    { $post['message'] = (substr($post['message'], 0, 100)). '...... <br> </br> Please register to see the whole post,<br> </br>  you can <B><a href="/forum/register.php" type="text/html">Register here</a></B>';

}]]></phpcode>
        </plugin>
    </plugins>
    <phrases>
    </phrases>
    <options>
    </options>
    <helptopics>
    </helptopics>
    <cronentries>
    </cronentries>
    <faqentries>
    </faqentries>
</product>

If your forums are not in the forum directory, then just change 'forum' to the name of your forum directory.

Job done.

Edit, I think this Mod is absolutely superb, so much so that I've rated it and also nominated it for MOTM, which is something I never do, I know I've played around with the product.xml, but the concept is what makes it so good, so well done to the original coder for setting it up in the first place.


All times are GMT. The time now is 10:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01204 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete