Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[CM] Twitter SlideBox (Widget) Details »»
[CM] Twitter SlideBox (Widget)
Version: 1.00, by ChiNa ChiNa is offline
Developer Last Online: Feb 2023 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.2.0 Rating:
Released: 08-04-2012 Last Update: Never Installs: 16
Uses Plugins Template Edits Auto-Templates
Additional Files Translations  
No support by the author.

[CM] Twitter SlideBox (Widget)


Notice: Please be adviced that the Twitter code has changed since this mod was created. All though you can still use the new Code using our method. You just have to play arround with the new code befor implementing the code in your modfication.


::::::::::::::: Other Social Mods Related to this :::::::::::::::

Facebook SlideBox: Click Here
Floating SideBar: Click Here

Download Mod For vBulletin 3.8.x. CLICK HERE! (NEW)



Hey Everyone, I made this first as a Facebook LikeBox, and now you can get it as Twitter Widget too. Its very small and simple! I hope you will like it.. And what you will achieve with this tutorial is that when mouse over the image, it will shift / slide your Twitter-Box Widget.

Lets Start with the Example Images First, and then the Modification!


The modification may look a bit scary or confusing, but its very easy and after 1 time, you will install it without any help the next time!

Only 3 Template Edits
Image: Slide In


Image: Slide Out


==================== Modification Starts =====================


Step 1: Go to your ADMINCP, and then Styles & Templates.
Now to your right in the Dropdown menu, click on Edit Template, now find the "headinclude" template, which is the best place to add your Javascript or Jquery codes. And thats whats what we are going to do! Scroll all the way down, and to add the code below everything else...

Code to add:

PHP Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<
script type="text/javascript">
jQuery.noConflict();
jQuery(function (){
jQuery(".twitbox").hover(function(){
jQuery(".twitbox").stop(truefalse).animate({right:"0"},"medium");
},function(){
jQuery(".twitbox").stop(truefalse).animate({right:"-250"},"medium");
},
500);
return 
false;
});
</
script


Step 2: Now we have to add the CSS,
Go back to your Styles & Templates in (ADMINCP) and in your Templates Dropdown choose "Edit Templates"!

Now scroll down till you find the CSS Templates. In the CSS Templates click and open the "additional.css" template! And add the following code below all the other codes: (If its empty, just add it in the front)

Code to add:

PHP Code:
.twitbox {
float:right;
width:288px;
height:345px;
backgroundurl(images/twitbox.pngno-repeat !important;
display:block;
right:-250px;
padding:0;
position:fixed;
top130px;
z-index:1002;
border-radius:10px;
-
moz-border-radius:10px;
-
webkit-border-radius:10px;
}
div.twitboxwrap {
margin-top:2px;
margin-left:-5px;
background#fff;
width:238px;
height:325px;
overflow:hidden;
border-radius:10px;
-
moz-border-radius:10px;
-
webkit-border-radius:10px;
}
div.twitboxwrap iframe {margin:-1px


Step 3:
Go to this Site https://twitter.com/settings/widgets

Login with your own account... Or if you dont have an account then signup for one!

The Widget option can also be seen in your PROFILE, below! Its called
WIDGETS! Now you can click on it and on you right side click on options are on your right side it says "Create new"!

Click on CREATE NEW, and after creating your widget, simply COPY the code from BELOW! We need to embed the code on your webpage, but in a bit...

Widget Settings: You can leave the Width and Height as it is. It will also ask you for a Scrollbar, and make sure to Click and mark it YES! Click SAVE on your twitter accounts widget that you created...

When you are done, Click on Finish & Grab Code!

Step 4:
Now add the CODE inside the original code showen below, instead of the BLUE TEXT. After you have added the code, your full code should be ready!

Look for the BLUE TEXT below, and replace it with the code you just got for the Widget!:

Code to add:
Code:
<div   class="twitbox"><div style="color: rgb(255, 255, 255); padding:   8px 5px 0pt 50px;"><span><div class='twitboxwrap'>PUT THE WIDGET CODE HERE</div></span></div></div>
REPLACE THIS PART --> "PUT THE WIDGET CODE HERE" WITH THE WIDGET CODE.

STEP 5:
When your are done putting the WIDGET CODE inside the real code, Then now we need to put it all in your HEADER template, or footer...

Put the code below everything else in the tempplate. And you are DONE! (You can see an example of my CODE, used on my site below this post, so you get an idea of how it looks like when finished)

STEP 6:
Now copy the "twitbox.png" image from the attachment below, or from below the text, and upload it in your "images" folder in the root of your ftp!

We are DONE, Please its very important that you click INSTALLED after Installing, for future support! Thank you!


=================== Modification End ===============
===


Extra Troubleshoots & Info


Below you see example of the full code used in my forum:
The code in BLUE color is the twitter widget code:

Code:
<div  class="twitbox"><div style="color: rgb(255, 255, 255); padding:  8px 5px 0pt 50px;"><span><div class='twitboxwrap'><a class="twitter-timeline"  href="https://twitter.com/ChiNaCheats" data-widget-id="267073824858710017">Tweets by @ChiNaCheats</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div></span></div></div>

Screenshots

File Type: png twitbox.png (14.5 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-27-2012, 07:09 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it doesn't appear that you can use both your widgets at the same time. are you going to fix this in the future or should I just move one of these to the other side?
Reply With Quote
  #3  
Old 08-27-2012, 09:38 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sure you can, but I do not recommend it, It may affect your forum later on if you use another Jquery or Javascript on your site!

Check the link below, and the user is called qpurser, he actually used all my 3 Floating boxes on his website, and the codes are also posted in here.

Check this thread: Facebook SlideBox: Click Here

Reply With Quote
  #4  
Old 08-30-2012, 04:15 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was able to get both to work just needed to rebuild the image and edited the css to make them work... thanks
Reply With Quote
  #5  
Old 08-30-2012, 04:59 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad you made it work, thanks a lot for comming back and letting me know.. Well done mate... Thumbs up
Reply With Quote
  #6  
Old 08-30-2012, 05:43 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha yeah no problem you can check out the working version @ http://greenromproject.com

I can PM the css edits if anyone needs them.
Reply With Quote
Благодарность от:
ChiNa
  #7  
Old 12-09-2012, 01:28 PM
moustafa moustafa is offline
 
Join Date: Oct 2008
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can i show the number of followers in this widget?
Reply With Quote
  #8  
Old 01-07-2013, 01:57 PM
SpeedwayFreaks SpeedwayFreaks is offline
 
Join Date: Dec 2012
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I saw this on another vb site and had to have it. You are incredible ChiNa-Man. Fantastic Job.
I will be a loyal supporter of your work for sure. Very good instructions, easy to install.
Reply With Quote
Благодарность от:
ChiNa
  #9  
Old 01-07-2013, 04:11 PM
ChiNa ChiNa is offline
 
Join Date: Jul 2012
Posts: 457
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by SpeedwayFreaks View Post
I saw this on another vb site and had to have it. You are incredible ChiNa-Man. Fantastic Job.
I will be a loyal supporter of your work for sure. Very good instructions, easy to install.
Keep up your great attitude, our developers need it! Awesome comment.. Let me know if you needed further assistance and check out my facebook slider too, same as this one --> https://vborg.vbsupport.ru/showthread.php?t=286333
Reply With Quote
  #10  
Old 01-08-2013, 12:13 PM
JamalFree JamalFree is offline
 
Join Date: Dec 2012
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks....:up:
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 01:50 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06380 seconds
  • Memory Usage 2,347KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete