форум vBSupport.ru > vBSupport.ru > Гурушник > DrCustUmz
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'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
DrCustUmz
Знаток
 
DrCustUmz's Avatar
Default [Core - FIX] Broken Unsubscribe from forum
2

im not too sure how good of a fix this is, i have been up and down the core files, trying to figure this out. Just because it bothered me they include in the default template a condition for this, yet it does not work (by default)

By default when you subscribe to a forum (not a thread) underneath the forum you should see an unsubscribe link

This is supposed to happen with the code from:
forumhome_forumbit_level1_post
forumhome_forumbit_level2_post
Code:
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
But this code does not work.

I was trying to show images for this using an if / else statement but couldn't for the life of me get it to work.
so hours browsing / searching / asking; I finally find a fix (source: http://tracker.vbulletin.com/browse/VBIV-8931)

in includes/functions_forumlist.php
Find:
Code:
$show['forumsubscription'] = ($subsonly ? true : false);
Replace with:
Code:
$show['forumsubscription'] = !empty($forum['subscribeforumid']);
I was happy for a minute because now the link was showing, but then i realized it doesn't work on forumhome. (why not lvl1 and lvl2 are there, this code should work)

so I searched the core files up and down and I came up with this, which i took from another core file.

in index.php (forumhome)
add:
Code:
cache_ordered_forums(1, 1, $vbulletin->userinfo['userid']);
$show['subscribed_to_forum'] = ($vbulletin->forumcache["$foruminfo[forumid]"]['subscribeforumid'] != '' ? true : false);
below:
Code:
// ######################## START MAIN SCRIPT ############################
im not sure how good of a fix this is, but it works. i have not noticed any ill side effects applying these changes.

I did how ever notice in index.php is
Code:
cache_ordered_forums(1, 1);
and i do not know if the added code will conflict with that, i tried adding just
Code:
$show['subscribed_to_forum'] = ($vbulletin->forumcache["$foruminfo[forumid]"]['subscribeforumid'] != '' ? true : false);
below that, and in other places but it wouldn't work without
Code:
cache_ordered_forums(1, 1, $vbulletin->userinfo['userid']);

Now for an addon!
got the fix applied? well you have to for this.

so now if your users are subscribed to a forum they can see an unsubscribe link under the forum title, but hey you've come all this way, lets not keep it ugly.

so in both forumhome_forumbit_level1 & level2_post
find:
Code:
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
replace with: (change style and img locations as you see fit)
Code:
<if condition="$show['forumsubscription']">
    <div style="float:right;"> 
      <a href="subscription.php?$session[sessionurl]do=removesubscription&amp;f=$forum[forumid]" rel="nofollow" title="$vbphrase[unsubscribe_from_this_forum]"><img src="unsubscribe.png" alt="$vbphrase[unsubscribe_from_this_forum]"/></a>
    </div>
  <else />
    <div style="float:right;"> 
      <a href="subscription.php?$session[sessionurl]do=addsubscription&amp;f=$forum[forumid]" rel="nofollow" title="$vbphrase[subscribe_to_forum]"><img src="subscribe.png" alt="$vbphrase[subscribe_to_forum]"/></a>
    </div>
  </if>
attached are the images in the screenshot.
Attached Thumbnails
2016-04-06_16-30-34.png   2016-04-06_15-58-57.png  
Attached Images
  
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 

Tags
core, fix, subscribe, unsubscribe


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:47 AM.


Powered by vBulletin® Version 3.0.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.