PDA

View Full Version : Show Thread Enhancements - specify how usergroups see postings


tyfoon
12-25-2009, 10:00 PM
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:



if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 50)). '<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;

['userid'] )

{ $post['message'] = (substr($post['message'], 0, 100)). '......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

<?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.

Charlie98902
12-26-2009, 05:44 PM
Delilahs that replacement allows what I was wanting? Sorry I haven't looked back on your forum to see.

Delilahs
12-26-2009, 05:47 PM
Charlie, Have a look at my forum to see, But it works fine for me and has allowed me to open my forum right up, I've limited it to 100 characters, which is more than enough for people to see what the forum is about, if they don't register now, then they can't be that bothered.
I really do like the options this now gives me as a forum owner.

Charlie98902
12-26-2009, 05:49 PM
Thanks just looked and saw that part of the code so yes nice indeed. Thanks Delilahs.

pozo
12-26-2009, 06:00 PM
Installed & nominated for MOTM :up: :up:

By the way, I have also modified it a little bit, to make it more presentable to guests:
108229

blake247
12-26-2009, 06:21 PM
Installed and nominated...

Shogo
12-26-2009, 06:54 PM
Is it possible to hide only the links?
I think there was a mod for 3.8 to hide only links but this mod looks to be interesting if you can add the hide links.

Delilahs
12-26-2009, 07:48 PM
Shogo

The Hide links from Guests Mod for vB4 (https://vborg.vbsupport.ru/showthread.php?t=123415)

lms
12-26-2009, 08:25 PM
Trabaja de maravilla. He a?adido c?digo para que no se vea al citar ni en la versi?n imprimible ni al responder citando. He puesto una frase.

Perd?n por mi mal ingl?s, soy espa?ol y uso traductor.

Work fine. I have added code for that is not see in the printable version or to newreply quote or newreply post quote. I have put a phrase.

Forgiveness for my bad english, i am spanish and use translator..

The code in spanish:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="show_partial_guests" active="1">
<title>Mostrar parcialmente los mensajes a los invitados</title>
<description>Muestra a los invitados solo una parte del mensaje</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>Ocultar Mensaje</title>
<hookname>postbit_display_complete</hookname>
<phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>Ocultar Mensaje al Responder Citando</title>
<hookname>newreply_quote</hookname>
<phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>Ocultar Mensaje al Citar</title>
<hookname>newreply_post_quote</hookname>
<phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>Ocultar Mensaje en versi?n imprimible</title>
<hookname>printthread_post</hookname>
<phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
</plugins>
<phrases>
<phrasetype name="GLOBAL" fieldname="global">
<phrase name="tyfoon_hide_post_register" date="0" username="tyfoon" version=""><![CDATA[ Reg?strate para ver el mensaje completo <a href="register.php" type="text/html">Registrar</a>]]></phrase>
</phrasetype>
</phrases>
<options>
</options>
<helptopics>
</helptopics>
<cronentries>
</cronentries>
<faqentries>
</faqentries>
</product>

The code in english:
<?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, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>post hide Newreply Quote</title>
<hookname>newreply_quote</hookname>
<phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>post hide Post Quote</title>
<hookname>newreply_post_quote</hookname>
<phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
<plugin active="1" executionorder="5">
<title>post hide in printable version</title>
<hookname>printthread_post</hookname>
<phpcode><![CDATA[if (!$vbulletin->userinfo['userid'] )
{ $post['message'] = (substr($post['message'], 0, 150)). $vbphrase[tyfoon_hide_post_register];
}]]></phpcode>
</plugin>
</plugins>
<phrases>
<phrasetype name="GLOBAL" fieldname="global">
<phrase name="tyfoon_hide_post_register" date="0" username="tyfoon" version=""><![CDATA[ Please register to see the whole posting <a href="register.php" type="text/html">Register</a>]]></phrase>
</phrasetype>
</phrases>
<options>
</options>
<helptopics>
</helptopics>
<cronentries>
</cronentries>
<faqentries>
</faqentries>
</product>


Attachment is in spanish (product-show_partial_guests(es-ES).xml) and english (product-show_partial_guests(en-EN).xml).

Salud2

Shogo
12-26-2009, 10:53 PM
Shogo

The Hide links from Guests Mod for vB4 (https://vborg.vbsupport.ru/showthread.php?t=123415)

Hum I know this mod but this is not VB 4 version

I think that would be cool to make one mod with options to hide links, hide after X letters, hide links and after X letters, ...

On my board, the first thing posted is a link and after a text...

Universal
12-27-2009, 01:33 AM
I was wondering if it was possible to add in options different category IDs (Forums) we can choose to use this mod on? This is so it is not used on the whole forum.

Delilahs
12-27-2009, 06:20 AM
Shogo, it works on vB4

tyfoon
12-27-2009, 07:03 AM
I was wondering if it was possible to add in options different category IDs (Forums) we can choose to use this mod on? This is so it is not used on the whole forum.

will update today

pablete
12-27-2009, 11:52 AM
. '...... <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>';



Thank's men. I sugged only one thing. the <br><br> i think better so: <br /><br />
:D

denman75
12-27-2009, 01:20 PM
Installed & nominated for MOTM :up: :up:

By the way, I have also modified it a little bit, to make it more presentable to guests:
108229



can u share the code ,since i dont have the skill do do it self
to make it a colored line and so on

is u want u can pm me ?

thank you much sir



installed and nominated

webspider
12-27-2009, 01:52 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.
.

Sorry to bother you but you mentioned the limited viewing system.I used that mod on 3.8 but removed it before upgrading. Has a version been released for VB4? I don't see it on the Mod listing.

pozo
12-27-2009, 02:34 PM
can u share the code ,since i dont have the skill do do it self
to make it a colored line and so on

is u want u can pm me ?

thank you much sir

Open AdminCP, go to "Addons & Plugins", "Manage Plugins" -> "Add-on : Show partial post guests"

Edit the "post hide" and replace it with the following code:

if (!$vbulletin->userinfo['userid'] )

{ $post['message'] = (substr($post['message'], 0, 100)). '<font color="#FF0000">.....<br></br>[<i>Du musst angemeldet sein um den kompletten Beitrag zu sehen: <a href="/register.php" type="text/html"> </i><b>Hier registrieren</b></a>]</font>';

}

You only have to translate it to the text you want, because I'm using it in German language.
If that's a problem for you, please send me a PN with the text you need.

Greetz from Germany

Delilahs
12-27-2009, 02:47 PM
webspider, I've sent TedS a PM asking if I can post the Mod onto this forum, with full accreditation back to him, worst case scenario is that he will say no, and then put it on himself ;)

lms
12-27-2009, 05:04 PM
Trabaja de maravilla. He a?adido c?digo para que no se vea al citar ni en la versi?n imprimible ni al responder citando. He puesto bien el tema de las frases y de la configuraci?n.

Perd?n por mi mal ingl?s, soy espa?ol y uso traductor.

Work fine. I have added code for that is not see in the printable version or to newreply quote or newreply post quote. I have put the subject of the phrases and configuration.

Forgiveness for my bad english, i am spanish and use translator..


Attachment is in spanish (product-guests_limit_viewing(es-ES).xml) and english (product-guests_limit_viewing(en-EN).xml).

Salud2

Delilahs
12-27-2009, 08:16 PM
Limited Guest Viewing for vB4 has now been released.

here you go, thanks to Ted (https://vborg.vbsupport.ru/showthread.php?t=231352)

Universal
12-27-2009, 10:43 PM
will update today

Thankyou very much tyfoon :)

voleuramour
12-27-2009, 11:05 PM
this is not working at all (vBulletin 4.0.0 Patch Level 1)

tyfoon
12-28-2009, 01:58 PM
this is not working at all (vBulletin 4.0.0 Patch Level 1)

It is working, but you make sure you turned it on in the vbulletin options. and in the forums where you want it or globaly if you want it in all the forums

TalkVirginia
12-28-2009, 02:26 PM
I'm still having an issue where the first part of the register message is getting chopped before the register link if the post has a quote in it.

Anyone experiencing this?

Greight
12-28-2009, 06:29 PM
Can you tell me where the global settings are ?

Vaupell
12-28-2009, 09:49 PM
Can you tell me where the global settings are ?

cant ewen find the options in admincp > settings > ???
nothing..

but i can easy find it in admincp > forums ... > under each forum (enable)
after enableing dosent work..

but looking for that little checkmark, hidden somewhere..

-- Edit great idea, but uninstalled, until working. switching back to bb code hider.
eigerly awaiting a update.

Seven Skins
12-28-2009, 09:55 PM
Same here. Nothing in admincp options.

tthiess
12-29-2009, 03:12 AM
Same here. Nothing in admincp options.

I have the same problem, nothing in admincp options.

Greight
12-29-2009, 04:46 AM
So ...

lms
12-29-2009, 10:42 PM
cant ewen find the options in admincp > settings > ???
nothing..

but i can easy find it in admincp > forums ... > under each forum (enable)
after enableing dosent work..

but looking for that little checkmark, hidden somewhere..

-- Edit great idea, but uninstalled, until working. switching back to bb code hider.
eigerly awaiting a update.

Same here. Nothing in admincp options.

I have the same problem, nothing in admincp options.

So ...

Test with this. It works perfect. It sees everything in ACP countries and the edit forums. Complies with all the promised by tyfoon.

I hope that he can add something more.

It works perfect in vB4.0.1 Patch Level 1.

I leave in deputy in english and spanish. Forgiveness for my bad english, but i am spanish and use translator.

It is a mod configurable through the Management Panel (General Options->Options):

Activate or deactivate the Mod.
Activate globally for all forums or forum to forum (in manager of forums->edit forum)
Activate way debug for that as admin can adjust its
Quantity effect of characters to show the text of a message or
Percentage of the text (the total of characters of the message) to show
Text to show in replacement of the rest of the message.
Redirection that you want to provide (habitual and default register.php)


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

Probad con este. Funciona perfecto. Se ve todo en ACP y al editar foros. Cumple con todo lo prometido por tyfoon.

Espero que se le pueda a?adir alguna cosa m?s.

Lo dejo en adjunto en espa?ol e ingl?s.

Es un mod configurable a trav?s del Panel de Gesti?n (Opciones Generales->Opciones):

Activar o desactivar el Mod.
Activar globalmente para todos los foros o foro a foro (en gestor de foros->editar foro)
Activar modo debug para que como admin puedas ajustar su efecto
Cantidad de caracteres a mostrar del texto de un mensaje o
Porcentaje del texto (respecto al total de caracteres del mensaje) a mostrar
Texto a mostrar en sustituci?n del resto del mensaje.
Redirecci?n que se quiere dar (habitual y predeterminadamente register.php)


Funciona perfecto en vB4.0.1 Patch Level 1.

Perd?n por mi mal ingl?s pero soy espa?ol y uso traductor.

Salud2

tyfoon
01-01-2010, 04:46 PM
acp bug found and updated ,

this will be the final beta version, hope you enjoy it

Greight
01-01-2010, 06:15 PM
Conflict with MARCO1 Hide All. When enabled links are shown.

tyfoon
01-02-2010, 10:27 AM
Updated :

Now uo can also hide fontsize colors fonts, in the postings so the specified usergroups see only the default font and color format of the postings.

Talk-Pets
01-19-2010, 08:41 AM
I cant get this to work... So frustrating as its a really good mod. I cant see where to edit text or reg link and have no option in forums to not make it global...

If anyone wants to help, please send me a pm.

forumguy1
01-20-2010, 04:47 PM
Same issues for me.

when enabled my forum posts look weird and dont have options anywhere to enable the timestamp etc. By defaut the post titles, timestamp are missing.

Where do we upload the actual file: bitfield_tyfoon_special_access.xml

denman75
01-20-2010, 06:40 PM
its not working ,
i get this error

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4760

jo-z
02-04-2010, 08:48 AM
same here, got the

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4760

where to upload the bitfield_tyfoon_special_access.xml ?

Thanks in advance,

Greight
04-04-2010, 07:38 PM
not working for me.

TalkVirginia
04-04-2010, 08:39 PM
same here, got the

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 4760

where to upload the bitfield_tyfoon_special_access.xml ?

Thanks in advance,

Bitfield files go in the {forumroot}/includes/xml folder

vbreal
04-04-2010, 10:25 PM
what are the three different files for?

TalkVirginia
04-04-2010, 10:35 PM
what are the three different files for?

I don't know much about this mod, but taking an educated guess, I would have to say that you only need the bitfield xml and and the 033 xml since that appears to be the most recent release. :)

TurkYasam
04-09-2010, 05:27 AM
First of all thanks for this great mod..
I will have some feature request, if it can be done.. :)

1-Hide Avatars Option..
2-Hide Signitures option..
3-Postbit for guests but postbit_legacy for members and above..

Regars..

genxstan
04-17-2010, 06:51 AM
Can i hide code block with this hack?

lovevn
07-22-2010, 01:32 PM
Great mode. However, I have some question.
When I active it globally, it ignore the permission that I set via user group. The problem is that I can not see anywhere to set it on to for some forums and turn it off for some other. I have look at forum manager but see nothing.

Kingdombuilder
03-02-2011, 04:21 AM
Can anyone verify whether this mod works for 4.1.2?

iglow
04-29-2011, 12:59 AM
Can anyone verify whether this mod works for 4.1.2?

and does thsi work on 4.1.3 ? i instlaled so many of this kind im getting irritated!
the thread here also doesnt explain how to exactly imeplemt this 3 xmls!

yin9
05-25-2020, 10:42 PM
Not work on 4.2.5 and PHP 7.1.