Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2007, 05:33 PM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Scriptaculous for vbulletin API Thread

I recently released this mod.

https://vborg.vbsupport.ru/showthread.php?t=136161

This thread is to discuss things that can be done with the library the plugin uses outside the scope of the plugin itself. I wrote a small transition library for this mod that others can feel free to use. This thread is to discuss the use of that library. Note that nothing here functions without the mod first being installed.

This is a javascript library so using it will involve template edits only.

function Scriptaculous_init()

This executes a fade the screen in effect, provided you wrapped the whole page in a primary_window div. If you don't want this effect remove the "display: none;" property from the primary_window div and omit this line in the footer. However, note that in future versions of the vb/scriptalicious library this will have more things to do. First among them is I plan on writting an extension that will allow the user to set the fade times in the admincp. For these to have an effect they'll need to be parsed out of an external javascript (putting the vars inline in a template is doable but clumsy).

function scriptaculous_log_out()

This fades the main screen to 50% opacity and launches a dialog for the user to log out with. Called from the navbar logout onclick property.

function dialogLaunch(ObjectId)

This fades the window, then pops up the specified element. To work you need to pass the id name to this function.

Consider the following example code.

HTML Code:
<a href="#top" onClick="dialogLaunch('goingson');">Pop up What's Going On</a>
When the link is clicked the script finds the element (usually a div) with the id "goingson" and makes it appear. The layer would look like this.

HTML Code:
<div id="goingson" style="display:none; position: absolute;">Text to show<a href="#top" onclick="dialogClose('goingson');">Close this popup</a></div>
As you can see above, you need to provide a button or link on the pop-up window to allow the user to close the popup-window once it is launched.

function dialogOpen(ObjectId)

Opens a dialog without the fade effect. This isn't meant to be called directly - it exists because dialogLaunch needs to call this in a setTimeout() function call.

function dialogClose(ObjectId)

Close the dialog and fade the main window back in.

function restoreMain()
Restores the main window back to 100% opacity. Called by dialogClose - this isn't meant to be directly called.

The above is provided in the hopes that it will prove useful. I started this as a separate thread from the module itself so that questions, answers and comments on the API won't get lost among the support questions in the mod thread itself.
Reply With Quote
  #2  
Old 02-05-2007, 11:16 AM
oocuz oocuz is offline
 
Join Date: Jan 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice addon =) How i can possibly use it to make all images inside the forum appear in such a fade screen?
Reply With Quote
  #3  
Old 07-12-2007, 07:21 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one
the problem is that https://vborg.vbsupport.ru/showthread.php?t=136161 isnt available
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 07:21 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03527 seconds
  • Memory Usage 2,180KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete