PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Sun Jan 24, 2010 7:27 am Reply with quote Back to top

Greetings all,
I am working on a whole new way of handling videos for RN.

I have a stand alone that I created that works excellent and I have been converting it to run on RN.

What this does is take a YouTube Embed code and play it on the site. In the standalone I have it using lytebox to open the video player. I would prefer not to reinvent the wheel and would rather use the built in JS in RN.

What I am looking for is a lightbox look that will open a file (vs an image....no not the embed code....player.php)

I know RN uses JQuery but I do not know much about it and how it really is intergrated into RN.

Could someone point the way here.

I have all the functions complete. Display, Display by Category, Add, Edit, Suspend, Readmit, Delete, Category control, Group control of add-edit functions. I am very pleased with how it is comig. Now I jsut need to make the actual player part work in RN.

Thank you for your help!!

Dawg
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1435
Location: North Carolina

PostPosted: Sun Jan 24, 2010 7:46 am Reply with quote Back to top

The Jquery lightbox that is used with RavenNuke is Colorbox.
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Send e-mail Visit poster's website
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Sun Jan 24, 2010 8:33 am Reply with quote Back to top

Supports photos, photo groups, slideshow, ajax, inline, and iframed content.

Does that mean I can call a file with it? (inline?)

Thank You for your help!

Dawg
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1252
Location: Texas, USA

PostPosted: Sun Jan 24, 2010 8:37 am Reply with quote Back to top

here is one example of a setup, open includes/jquery/jquery.colorbox.php
find
Code:
$inlineJS = '<script type="text/javascript">
   $(document).ready(function(){
      $(".colorbox").colorbox({opacity:0.65, current:"{current} of {total}"});
      $(".colorboxSEO").colorbox({opacity:0.50, width:"750", height:"300", iframe:true});
   });
</script>'."\n";
addJSToHead($inlineJS,'inline');

replace with
Code:
$inlineJS = '<script type="text/javascript">
   $(document).ready(function(){
      $(".colorbox").colorbox({opacity:0.65, current:"{current} of {total}"});
      $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
      $(".colorboxSEO").colorbox({opacity:0.50, width:"750", height:"300", iframe:true});
   });
</script>'."\n";
addJSToHead($inlineJS,'inline');


and the html
Code:
<a class='example6' href="http://www.youtube.com/v/617ANIA5Rqs" title="The Knife: We Share Our Mother's Health">Flash / Video (Iframe/Direct Link To YouTube)</a>


and also make sure the scripts are loaded by your module, or site wide if you using for blocks, etc.
Only registered users can see links on this board!
Get registered or login to the forums!
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Sun Jan 24, 2010 8:42 am Reply with quote Back to top

SWEET!

Thanks Guys....

I should have sdomething ready for testing soon!

Dawg
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2404
Location: Pennsylvania

PostPosted: Sun Jan 24, 2010 10:42 am Reply with quote Back to top

Dawg, is this for the entire site or just a particular module? If it just for a module you should not be editing jquery.colorbox.php in my opinion.
View user's profile Send private message Visit poster's website
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Sun Jan 24, 2010 11:12 am Reply with quote Back to top

This will be for the MOD Rn_Video and then there will be blocks to support it.

What would you suggest?

I will drop you a PM with a link so you can see what I am doing.

Dawg
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2404
Location: Pennsylvania

PostPosted: Sun Jan 24, 2010 11:18 am Reply with quote Back to top

Actually now that I think about it you should not be using includes/jquery/jquery.colorbox.php at all because it will make upgrading harder.

If this is for a module only you need to place the following in your index before you call include header.php. If this is more of global thing then you need to create /includes/addons/head-youtube.php (replace "youtube" with what ever you want)

Index:
Code:

addCSSToHead('includes/jquery/css/colorbox.css','file');
addJSToHead('includes/jquery/jquery.js', 'file');
addJSToHead('includes/jquery/jquery.colorbox-min.js','file');

$inlineJS = '<script type="text/javascript">
   $(document).ready(function(){
      $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344}) iframe:true});
   });
</script>'."\n";
addJSToHead($inlineJS,'inline');


head-youtube.php
Code:

<?php
addCSSToHead('includes/jquery/css/colorbox.css','file');
addJSToHead('includes/jquery/jquery.js', 'file');
addJSToHead('includes/jquery/jquery.colorbox-min.js','file');

$inlineJS = '<script type="text/javascript">
   $(document).ready(function(){
      $(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344}) iframe:true});
   });
</script>'."\n";
addJSToHead($inlineJS,'inline');
?>
View user's profile Send private message Visit poster's website
Dawg
RavenNuke(tm) Development Team


Joined: Nov 07, 2003
Posts: 884

PostPosted: Sun Jan 24, 2010 11:36 am Reply with quote Back to top

Palbin,

Thank you so much!! Your time is very much appreciated!

Dawg
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1252
Location: Texas, USA

PostPosted: Sun Jan 24, 2010 3:26 pm Reply with quote Back to top

Quote:
Actually now that I think about it you should not be using includes/jquery/jquery.colorbox.php at all because it will make upgrading harder.


yes, good point, probably better to define that elsewhere Smile

I guess I'm a little confused why we have to reload all the core JS and CSS. In header.php it doesn't look like there is anything conditional about whether they load or not... Looks like they should load everytime, even if nukeNAV is disabled...??

from header.php
Code:
   // Post 138905 Step 6
   include_once INCLUDE_PATH . 'includes/jquery/jquery.php';
   include_once INCLUDE_PATH . 'includes/jquery/jquery.colorbox.php';
   include_once INCLUDE_PATH . 'includes/tabcontent/tabcontent.php';
   include_once INCLUDE_PATH . 'includes/ajaxtabs/ajaxtabs.php';
   include_once INCLUDE_PATH . 'includes/custom_files/nukeSEO/nukePIEhdr.php';
   include_once INCLUDE_PATH . 'includes/custom_files/nukeSEO/nukeFEEDhdr.php';



  • includes/jquery/jquery.php loads includes/jquery/jquery.js
  • includes/jquery/jquery.colorbox.php loads includes/jquery/jquery.colorbox-min.js and includes/jquery/css/colorbox.css


Am I missing something here? Or maybe this is to maintain compatibility with future changes?
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2404
Location: Pennsylvania

PostPosted: Sun Jan 24, 2010 4:35 pm Reply with quote Back to top

You are not missing anything, but there are two reasons.

The first is that it assures that the main jQuery library is loaded before "your plugins". The second is as you suggest to maintain compatibility with future changes because in my opinion ultimately with the new system none of these should exist.
Code:

   // Post 138905 Step 6
   include_once INCLUDE_PATH . 'includes/jquery/jquery.php';
   include_once INCLUDE_PATH . 'includes/jquery/jquery.colorbox.php';
   include_once INCLUDE_PATH . 'includes/tabcontent/tabcontent.php';
   include_once INCLUDE_PATH . 'includes/ajaxtabs/ajaxtabs.php';
   include_once INCLUDE_PATH . 'includes/custom_files/nukeSEO/nukePIEhdr.php';
   include_once INCLUDE_PATH . 'includes/custom_files/nukeSEO/nukeFEEDhdr.php';
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1252
Location: Texas, USA

PostPosted: Sun Jan 24, 2010 4:39 pm Reply with quote Back to top

ok wait, I think I can answer my own question.. so the scripts are loaded in the proper order Smile

because this section of code executes before jquery.php is included, which means any custom included scripts will load before jquery Sad
Code:
   // nukeSEO Dynamic HEAD - load HTML, HEAD tags
   include_once INCLUDE_PATH . 'includes/nukeSEO/nukeSEOdh.php';


that about right?
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1252
Location: Texas, USA

PostPosted: Sun Jan 24, 2010 4:41 pm Reply with quote Back to top

ahh, you looks like you posted while I was posting Smile
makes sense and I think I'm getting a better understanding of how everything ties together... also makes sense for the future where only required js and css files are loaded.
View user's profile Send private message
wHiTeHaT
Involved
Involved


Joined: Jul 18, 2004
Posts: 431
Location: Netherlands

PostPosted: Mon Jan 25, 2010 11:11 am Reply with quote Back to top

i suggest
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum