форум vBSupport.ru > Камчатка > Pocket PC vBulletin.net.ru
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
VikZet
Простоузер
Default Очень срочно, у кого есть доступ на www.vbulletin.org
0

не смог найти свою старю тему с интсрукцией по этому хаку

http://www.vbulletin.org/forum/showt...user%27s+posts



не мог бы кто нить её ещё раз выдернуть оттуда, заранее спасибо
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
zCarot
zМарковь
Хочет третью строчку =)
 
zCarot's Avatar
Default
0

Quote:
Originally Posted by antialiasis
This hack in a nutshell: All users on your forum will be able to add optional BBCode to format all of their posts with.

This was inspired by DarthCow's user setable default BB code formatting for each post hack for vBulletin 3.0, borrows a couple of regular expressions from it and used it for reference in one spot. Everything else is my own.

Version 1.03: Regular expression bug with colors and fonts fixed. SQL query added to install code.

Version 1.02: Regular expression for "Default BBCode" field edited to support fonts with spaces in them.

Version 1.01: One file edit was moved to a plugin, which allows the Lite version to be pure plugins. No functionality was changed, so if you already installed version 1.0, there is no particular reason to upgrade; however, if you do want to, simply install the new product and undo the file edit by finding and removing this from includes/class_postbit.php:

Code:
$this->post['defaultbbcodes'] = $this->bbcode_parser->parse($this->post['defaultbbcodes'], $this->forum['forumid'], $this->post['allowsmilie']);

		$dbbctags = explode("MESSAGE", $this->post['defaultbbcodes']);
		$this->post['dbbcopen'] = $dbbctags[0];
		$this->post['dbbcclose'] = $dbbctags[1];


ADDITIONAL FEATURES

-enable or disable default BBCode for individual posts you make
-choose in your user CP whether to see any default BBCode at all

I should note that I have very little previous experience of PHP (although I'm not new to general website scripting) and this is my first real hack. It was a challenge to make, perhaps more challenging than I assumed it would when I started it. But as I'm new to this, the code is most likely not the neatest you've ever seen, and there may be unnecessary file edits that could be made into plugins, etc. although I did my best to fit everything I could into the plugin system. All I know is that it works like a dream for me.

There are almost certainly bugs or something, so I'm releasing this as a beta and any pointers to make the installation less of a hassle would be greatly appreciated. Please excuse if there is anything I've done dreadfully wrong in the format of this, too. I will do my best to provide support, although I can't promise I'll be able to solve all your problems.

1 Product install
2 Custom profile fields
3 Template edits (in 6 templates)
7 File edits (in 6 files)
2 Plugin edits

There is a "lite version" too: if all those file edits are scaring you away, they are only present because of the feature to enable or disable default BBCode in a particular post. I can imagine quite a lot of situations where members would really not want their default BBCode on one particular post of theirs so the hack is definitely better with it, but if you would rather be using a plugin version with one template edit, go to this thread


INSTALLATION INSTRUCTIONS

1. Download the product and import it.
2. Add two custom profile fields:

Profile field type: Single-line textbox
Title: Default BBCode
Description: You may choose to make a default BBCode formatting for each post. Allowed tags: [b] [i] [u] [left] [right] [center] [font] [color] [size] Please type in only the opening tags.
Max length of allowed user input: Doesn't really matter, but make sure it's enough
Display size: 25
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No
Regular expression: ^(\[(b|i|u|left|right|center|font|color|size)(\=(\'|")?(#[0-9a-fA-F]+)?[\w\s]+)?('|")?\])*$
Display Page: Options: Other

(Here you can edit the description and regular expression to allow or disallow BBCode - in the regular expression, just make sure to separate all of them with |.)

Profile field type: Single-selection radio buttons
Title: Show Default BBCode?
Description: Selecting no will cause all posts to be displayed without users' automatic BBCode formatting.
Options: Yes
No
Set Default: Yes
Field Required: No
Field Editable by User: Yes
Private Field: Yes
Field Searchable on Members List: No
Show on Members List: No
Allow user to input their own value for this option: No
Display Page: Options: Thread Viewing

3. Make the following edits:



############## TEMPLATE EDITS ###################

In newreply, newthread and editpost

FIND

Code:
						<if condition="$bbuserinfo['signature'] != ''"><div><label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" $checked[signature] />$vbphrase[show_your_signature]</label></div></if>
BELOW it add

Code:
						<if condition="$bbuserinfo['field123'] != ''"><div><label for="cb_defaultbbcode"><input type="checkbox" name="defaultbbcode" value="1" id="cb_defaultbbcode" tabindex="1" $checked[defaultbbcode] />$vbphrase[use_default_bbcode]</label></div></if>
Replace "field123" with your "Default BBCode" field.

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

In postbit and postbit_legacy

FIND

Code:
$post[message]
REPLACE with

Code:
                   <if condition="$post['dbbcopen'] AND $post['usedefaultbbcode'] AND ($bbuserinfo['field234'] == 'Yes')">$post[dbbcopen]</if>
                   $post[message]
                   <if condition="$post['dbbcclose'] AND $post['usedefaultbbcode'] AND ($bbuserinfo['field234'] == 'Yes')">$post[dbbcclose]</if>
Replace "field234" with your "Show Default BBCode?" field.

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

In SHOWTHREAD

FIND

Code:
			<input type="hidden" name="fromquickreply" value="1" />
			<input type="hidden" name="s" value="$session[sessionhash]" />
			<input type="hidden" name="do" value="postreply" />
			<input type="hidden" name="t" value="$threadid" id="qr_threadid" />
			<input type="hidden" name="p" value="$qrpostid" id="qr_postid" />
			<input type="hidden" name="parseurl" value="1" />
			<input type="hidden" name="loggedinuser" value="$bbuserinfo[userid]" />
BELOW it add

Code:
                        <input type="hidden" name="defaultbbcode" value="1" />
################## FILE EDITS ###################

In newreply.php and newthread.php

FIND

Code:
		if ($vbulletin->userinfo['signature'] != '')
		{
			$checked['signature'] = 'checked="checked"';
		}
		else
		{
			$checked['signature'] = '';
		}
BELOW it add

[code] // default bbcode
if ($vbulletin->userinfo['field123'] != '')
{
$checked['defaultbbcode'] = 'checked="checked"';
}
else
{
$checked['defaultbbcode'] = '';
}[code]

Replace "field123" with your default BBCode field.

Also FIND

Code:
	$show['misc_options'] = ($vbulletin->userinfo['signature'] != '' OR $show['parseurl'] OR !empty($disablesmiliesoption));
REPLACE with

Code:
	$show['misc_options'] = ($vbulletin->userinfo['signature'] != '' OR $vbulletin->userinfo['field123'] OR $show['parseurl'] OR !empty($disablesmiliesoption));
Again, replace "field123" with your default BBCode field.

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

In showthread.php

FIND

Code:
	// set show signature hidden field
	$showsig = iif($vbulletin->userinfo['signature'], 1, 0);
BELOW it add

Code:
	// set show default bbcode hidden field
	$showdefaultbbcode = iif($vbulletin->userinfo['field123'], 1, 0);
Replace "field123" with your field again.

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

In includes/class_dm_threadpost.php

FIND

Code:
			case 'pagetext':
			case 'allowsmilie':
			case 'showsignature':
			case 'ipaddress':
BELOW it add

Code:
			case 'usedefaultbbcode':
-------------------------------------------------

In includes/class_postbit.php

FIND

Code:
	/**
	* Process this post's user info assuming its a guest.
	*/
	function process_unregistered_user()
	{
		global $show, $vbphrase, $vbulletin;

		$this->post['rank'] = '';
		$this->post['postsperday'] = 0;
		$this->post['displaygroupid'] = 1;
		$this->post['musername'] = $this->post['username'] = $this->post['postusername'];
		$this->post['musername'] = fetch_musername($this->post, 'displaygroupid', 'musername');
		//$this->post['usertitle'] = $vbphrase['guest'];
		$this->post['usertitle'] =& $this->registry->usergroupcache["0"]['usertitle'];
		$this->post['joindate'] = '';
		$this->post['posts'] = 'n/a';
		$this->post['avatar'] = '';
		$this->post['profile'] = '';
		$this->post['email'] = '';
		$this->post['useremail'] = '';
		$this->post['icqicon'] = '';
		$this->post['aimicon'] = '';
		$this->post['yahooicon'] = '';
		$this->post['msnicon'] = '';
		$this->post['skypeicon'] = '';
		$this->post['homepage'] = '';
		$this->post['findposts'] = '';
		$this->post['signature'] = '';
		$this->post['reputationdisplay'] = '';
		$this->post['onlinestatus'] = '';
BELOW it add

Code:
		$this->post['defaultbbcode'] = '';
--------------------------------------------------

In includes/functions_newpost.php

FIND

Code:
	// set options
	$dataman->setr('showsignature', $post['signature']);
	$dataman->setr('allowsmilie', $post['enablesmilies']);
BELOW it add

Code:
	$dataman->setr('usedefaultbbcode', $post['defaultbbcode']);
Also FIND

Code:
// ###################### Start processcheckboxes #######################
function construct_checkboxes($post)
{
	global $checked;

	$checked = array(
		'parseurl' => iif($post['parseurl'], 'checked="checked"'),
		'disablesmilies' => iif($post['disablesmilies'], 'checked="checked"'),
		'signature' => iif($post['signature'], 'checked="checked"'),
BELOW it add
Code:
		'defaultbbcode' => iif($post['defaultbbcode'], 'checked="checked"'),



################## PLUGIN EDITS ##################

After installing the product, you will have to edit the following plugins:

Set default BBCode for post preview
Default BBCode setup

Find "field6" in both of them and replace it with your default BBCode field.



At this point the installation should be complete. Enjoy!
тра-ля-ля
 
 
VikZet
Простоузер
Default
1

огромное спасибо, ксатати а что с форумом ? у вас случайно проблем с базой не было, не могу найти посты некоторые
 
 
zCarot
zМарковь
Хочет третью строчку =)
 
zCarot's Avatar
Default
0

откат базы данных был. хостинг падал
 


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




All times are GMT +4. The time now is 05:42 AM.


Powered by vBulletin® Version 3.7.6
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.