PDA

View Full Version : End-User Options - Postbitswitcher


Surviver
01-08-2007, 10:00 PM
This Hack allow users to choose, if theay want to have a vertical or horizontal postbit.

Installation

- Import the Product
- Do the following Template-Edits

Template SHOWTHREAD

Search
<if condition="$show['addpoll']">
<tr>
<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" /> <a href="poll.php?$session[sessionurl]do=newpoll&t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></td>
</tr>
</if>Replace with:
<if condition="$show['addpoll']">
<tr>
<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/addpoll.gif" alt="$vbphrase[add_a_poll]" /> <a href="poll.php?$session[sessionurl]do=newpoll&t=$threadinfo[threadid]">$vbphrase[add_a_poll_to_this_thread]</a></td>
</tr>
</if>
<tr>
<td class="thead">$vbphrase[postbitlayout]</td>
</tr>
<tr>
<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_threaded.gif" alt="$vbphrase[postbitlayout]" /> <a href="showthread.php?$session[sessionurl]do=changepostbit&t=$threadinfo[threadid]"><if condition="$show['is_pl']">$vbphrase[postbit_top]<else />$vbphrase[postbit_left]</if></a></td>
</tr>Template modifyoptions

Search:
<tbody id="collapseobj_uopt_thrd" style="$vbcollapse[collapseobj_uopt_thrd]">
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">

<fieldset class="fieldset">
<legend>$vbphrase[visible_post_elements]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[option_to_hide_elements]</td>
</tr>
<tr>
<td>
<div><label for="cb_showsignatures"><input type="checkbox" name="options[showsignatures]" value="1" id="cb_showsignatures" $checked[showsignatures] />$vbphrase[show_signatures]</label><input type="hidden" name="set_options[showsignatures]" value="1" /></div>
<div><label for="cb_showavatars"><input type="checkbox" name="options[showavatars]" value="1" id="cb_showavatars" $checked[showavatars] />$vbphrase[show_avatars]</label><input type="hidden" name="set_options[showavatars]" value="1" /></div>
<div><label for="cb_showimages"><input type="checkbox" name="options[showimages]" value="1" id="cb_showimages" $checked[showimages] />$vbphrase[show_images] ($vbphrase[including_attached_and_img_code])</label><input type="hidden" name="set_options[showimages]" value="1" /></div>
</td>
</tr>
</table>
</fieldset>Replace with:
<tbody id="collapseobj_uopt_thrd" style="$vbcollapse[collapseobj_uopt_thrd]">
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">

<fieldset class="fieldset">
<legend>$vbphrase[visible_post_elements]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>$vbphrase[option_to_hide_elements]</td>
</tr>
<tr>
<td>
<div><label for="cb_showsignatures"><input type="checkbox" name="options[showsignatures]" value="1" id="cb_showsignatures" $checked[showsignatures] />$vbphrase[show_signatures]</label><input type="hidden" name="set_options[showsignatures]" value="1" /></div>
<div><label for="cb_showavatars"><input type="checkbox" name="options[showavatars]" value="1" id="cb_showavatars" $checked[showavatars] />$vbphrase[show_avatars]</label><input type="hidden" name="set_options[showavatars]" value="1" /></div>
<div><label for="cb_showimages"><input type="checkbox" name="options[showimages]" value="1" id="cb_showimages" $checked[showimages] />$vbphrase[show_images] ($vbphrase[including_attached_and_img_code])</label><input type="hidden" name="set_options[showimages]" value="1" /></div>
</td>
</tr>
</table>
</fieldset>
$postbitoptionsHave fun :)

Known Bugs
NoneChangelog

v 1.0.1
[F] Guests can now change the postbit type
[+] Now you can change this setting if you edit a user via ACP

Greetings Surviver

PS: If someone can improve the translation, it would be nice, if he would do this, because my English is very bad.

KURTZ
01-09-2007, 08:01 PM
INSTALLED

edit: but in the quick menu i havent any option :( and for future developments, maybe is a good thing to put the options in the ACP too :)

anyway good job

SIN77
01-09-2007, 08:16 PM
thanx for this, i perfer the horizontal postbit, but some of my members prefer the vertical one

hcmagix
01-09-2007, 08:40 PM
Hey Danke Surviver, hast Du das auch TMS optimiert? ;)

Super Sache

projectego
01-09-2007, 08:41 PM
Awesome! Thanks, Survivor!

Goat Boy
01-09-2007, 11:57 PM
Just want I always wanted.

Thanks

Surviver
01-10-2007, 03:29 AM
INSTALLED

edit: but in the quick menu i havent any option :( and for future developments, maybe is a good thing to put the options in the ACP too :)

anyway good job

I will add it ;)

Hey Danke Surviver, hast Du das auch TMS optimiert? ;)

Super Sache

Das Produkt unterst?tzt TMS :)

Greetings Surviver

AzzidReign
01-10-2007, 03:39 AM
Wow! Thanks a lot! I was hoping vbulletin would eventually release this as a part of their code since not everyone likes horizontal and not everyone likes vertical postbits!

My members are going to go nuts when they see this :)

Hornstar
01-10-2007, 09:07 AM
Now I wish I had added the modifications to the other postbit in all my templates lol I'll probably install this when I get around to adding all the content to them. nice work tho.

D.Ilyin
01-10-2007, 01:23 PM
UPDATED it! thanks!

KURTZ
01-10-2007, 01:27 PM
the codes in showthread and modifyoptions are changed? edit: probably not :)

also where is the option in the ACP? edit: found it in the user management :)

so UPDATED

but i think was better if you put this option ALSO in the usergroups management and not only in single user management :)

great, really great hack ;)

Shazz
01-10-2007, 01:42 PM
Looks very interesting, Will look more into it :)

KURTZ
01-10-2007, 01:43 PM
Looks very interesting, Will look more into it :)

totally agree this hack has a lot of potential :)

Surviver
01-10-2007, 01:49 PM
the codes in showthread and modifyoptions are changed? edit: probably not :)

also where is the option in the ACP? edit: found it in the user management :)

so UPDATED

but i think was better if you put this option ALSO in the usergroups management and not only in single user management :)

great, really great hack ;)

Aaah Usergrouppermissions. What do you mean ? Usergroup Standard OR Rights ?


Greetings Surviver

KURTZ
01-10-2007, 01:59 PM
UG Manager ---> edit UG ecc ecc :)

maybe you can set that the Admin can allow a specific UG to change the postbit lay-out ... i think this is the better way ... (obviously remains the single User settings like now)

waller99
01-10-2007, 03:58 PM
The original setting is "Site Default" Where can I set the site default at? Or can this only be changed for each individual user?

I want to make "vertical" the default. How can I do this?

KURTZ
01-10-2007, 04:03 PM
The original setting is "Site Default" Where can I set the site default at? Or can this only be changed for each individual user?

I want to make "vertical" the default. How can I do this?

in the ACP --- > vBulletin Options ecc ecc

waller99
01-10-2007, 05:11 PM
Got it. Thanks...

Snake
01-10-2007, 10:00 PM
Thanks for this! :D

Brew
01-11-2007, 03:47 AM
I was asking if they could release this to the wild (vb.org has the option in the usercp)....Thanks for doing it!

INSTALLED AND NOMINATED

btw....works flawlessly on my vb3.6.4 forums!

Smoothie
01-12-2007, 01:29 AM
Simply marvelous. Installed and working!

Yorixz
01-14-2007, 02:03 PM
Very nice, thanks a lot. Installed.

thewolrab
01-02-2008, 08:10 PM
Excellent. I was looking for one of these as the one provided on vBulletin.com for 3.5.x was no longer working for me, and (obviously) I expected the change on modifyoptions, but the dHTML popup in threads as well?

Installed:up:

Saskia
03-06-2008, 04:14 AM
These kinds of wonderful hacks are the ones vB should implement into its next version.

Excellent work and with such an easy install. Simple and incredibly useful. Working perfectly on 3.6.8. Keep it up!

mikkitine
03-06-2008, 06:15 AM
3.6.8 PL 2: Works perfectly. Thank you.

Allan
05-08-2008, 05:03 PM
French language by Nerilka ;)

akee
05-23-2008, 09:14 AM
hi!

try it somebody on 3.7.0 Gold?

I try it today, this is works on 3.7.0 Gold!

New Joe
04-28-2010, 02:29 AM
Installed and working fine on 3.8.X

Brew
01-13-2011, 01:13 PM
Surviver,

Can you update this to vb 4.x please?

Thanks!

.

empire10
04-20-2011, 02:41 PM
I got this working on 4.1.3, the functionality is still working but it does not display the user option in the profile edit options. To fix this do the following:

Edit template "modifyoptions_postbitmode" and replace the contents with:

<div class="blockrow">
<label for="sel_threadedmode">$vbphrase[post_display_mode]</label>
<select name="postbitmode">
<option value="0"<if condition="!$vbulletin->userinfo['postbitmode'] OR $vbulletin->userinfo['postbitmode'] == 0"> selected="selected"</if>>$vbphrase[use_forum_default]</option>
<option value="1"<if condition="$vbulletin->userinfo['postbitmode'] == 1"> selected="selected"</if>>$vbphrase[postbit_top]</option>
<option value="2"<if condition="$vbulletin->userinfo['postbitmode'] == 2"> selected="selected"</if>>$vbphrase[postbit_left]</option>
</select>
<p class="description">$vbphrase[choose_post_display_mode]</p>
</div>

And edit plugin "Optionen Anzeigen" replace with:
$templater = vB_Template::create('modifyoptions_postbitmode');
$template_hook['usercp_options_other'] .= $templater->render();