fxdigi-cash
04-18-2014, 10:00 PM
Intro:
just to give a quick summery about this mod. This is a plugin that can show add friend button in the post where users can take advantage of requesting friendships with other users without going to their profile pages.
I found most of the code in here : https://vborg.vbsupport.ru/showpost.php?p=2328242&postcount=15
so it is not actually mine, but was trying around how to make a use of it. The main Thanks goes to the coder: Yellow Slider (https://vborg.vbsupport.ru/member.php?u=157129) :up:
installation:
1- create a new plugin in your Adin cp by going to Plugins & Products --> add new plugin
2- use the following settings:
Product ---> vbulletin
Hook Location --> postbit_displate_complete
Title ---> "write your own words or whatsoever you like"
Execution Order --> 5
Plugin PHP Code --> insert the following code there:
$postuserinfo = fetch_userinfo($post['userid'], 128);
$isfriend = $postuserinfo['isfriend'];
if (!$isfriend)
{
$template_hook['postbit_controls'] .= '<span class="addfriend"><a href="profile.php? ' . $vbulletin->session->vars['sessionurl'] . 'do=addlist&userlist=friend&u=' . $post['userid'] . '">' . construct_phrase($vbphrase['add_as_friend'], $post['username']) . '<img class="addimg" alt="Add as Friend" src="images/site_icons/add.png"></a></span>';
}
save the work and you will see that add friend text has shown up in your postbit...
now you just need to add css to your additional.css:
.addimg{margin:-2px;}
.addfriend{position: absolute;right: 378px;}
save your template and check it out!!
ScreenShot:
https://vborg.vbsupport.ru/external/2014/04/25.jpg
Known Bugs:
The only issue with this plugin is that the button shows up to the logged in user as well in his own post which shouldn't. Instead, it is supposed to be hidden. if a fix is found, I will post it here.
Please mark this mod as installed if you used it
Nominate MOTM if you LOVE it! :D
Good luck for all!!
just to give a quick summery about this mod. This is a plugin that can show add friend button in the post where users can take advantage of requesting friendships with other users without going to their profile pages.
I found most of the code in here : https://vborg.vbsupport.ru/showpost.php?p=2328242&postcount=15
so it is not actually mine, but was trying around how to make a use of it. The main Thanks goes to the coder: Yellow Slider (https://vborg.vbsupport.ru/member.php?u=157129) :up:
installation:
1- create a new plugin in your Adin cp by going to Plugins & Products --> add new plugin
2- use the following settings:
Product ---> vbulletin
Hook Location --> postbit_displate_complete
Title ---> "write your own words or whatsoever you like"
Execution Order --> 5
Plugin PHP Code --> insert the following code there:
$postuserinfo = fetch_userinfo($post['userid'], 128);
$isfriend = $postuserinfo['isfriend'];
if (!$isfriend)
{
$template_hook['postbit_controls'] .= '<span class="addfriend"><a href="profile.php? ' . $vbulletin->session->vars['sessionurl'] . 'do=addlist&userlist=friend&u=' . $post['userid'] . '">' . construct_phrase($vbphrase['add_as_friend'], $post['username']) . '<img class="addimg" alt="Add as Friend" src="images/site_icons/add.png"></a></span>';
}
save the work and you will see that add friend text has shown up in your postbit...
now you just need to add css to your additional.css:
.addimg{margin:-2px;}
.addfriend{position: absolute;right: 378px;}
save your template and check it out!!
ScreenShot:
https://vborg.vbsupport.ru/external/2014/04/25.jpg
Known Bugs:
The only issue with this plugin is that the button shows up to the logged in user as well in his own post which shouldn't. Instead, it is supposed to be hidden. if a fix is found, I will post it here.
Please mark this mod as installed if you used it
Nominate MOTM if you LOVE it! :D
Good luck for all!!