PDA

View Full Version : remote content in glider



funnelmarketing
09-29-2009, 01:27 PM
1) Script Title: featured content glider

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentglider.htm

3) Describe problem: I would like some of my blog posts to show up in the glider. I am not sure how to go about that. Would I use remotecontent and if so how would I write it.

Thanks for your help

Sonya:)

ddadmin
09-29-2009, 05:39 PM
The key is to be able to output the glider contents in the required format, which is a series of contents each contained inside. <div class="glidecontent"></div>. If you're able to do that, then the resulting file can be fed to the glider to be shown. For example:


<div class="glidecontent">
<img src="http://i11.tinypic.com/8efzmmf.jpg" style="float: left; padding: 5px" />
British Columbia is the westernmost of Canada's provinces and is famed for its natural beauty. It's capital is Victoria, located at the southeastern tip of Vancouver Island. BC's most populous city is Vancouver, located in southwest corner of the BC mainland called the Lower Mainland.
</div>

<div class="glidecontent">
<img src="http://i15.tinypic.com/72vilba.jpg" style="float: right; padding: 5px"/>
Ontario is a province located in the central part of Canada, the largest by population and second largest, after Quebec in total area. Toronto, the capital of Ontario, is the centre of Canada's financial services and banking industry.
</div>

<div class="glidecontent">
<img src="http://i17.tinypic.com/8bg0lkx.jpg" style="float: left; padding: 5px"/>
Yukon, still commonly referred to as "The Yukon Territory", is the westernmost of Canada's three northern territories. The Yukon's major appeal is its nearly pristine nature. Tourism relies heavily on this and there are many organised outfitters and guides available to hunters and anglers and nature lovers of all sorts.
</div>

funnelmarketing
10-02-2009, 01:10 AM
Thanks for the reply. Is there anyway that I can use the code from my feature box:

(function featurecontent() { ?> (I think I would have to change this

<div id="my-feature-box"> and this)

<?php $my_query = new WP_Query('category_name=featured&showposts=3'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID;?>

<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>

<?php the_excerpt(); ?>

<div class="featurereadmore"> (Not sure about this)

<a href="<?php the_permalink() ?>" rel="bookmark" title="Read the full article">Read the full article &rarr;</a>

</div>

<?php endwhile; ?>

</div>

With my glider : ex

<script type="text/javascript">

featuredcontentglider.init({
gliderid: "canadaprovinces", //ID of main glider container
contentclass: "glidecontent", //Shared CSS class name of each glider content
togglerid: "p-select", //ID of toggler container
remotecontent: "", //Get gliding contents from external file on server? "filename" or "" to disable
selected: 0, //Default selected content index (0=1st)
persiststate: false, //Remember last content shown within browser session (true/false)?
speed: 500, //Glide animation duration (in milliseconds)
direction: "downup", //set direction of glide: "updown", "downup", "leftright", or "rightleft"
autorotate: true, //Auto rotate contents (true/false)?
autorotateconfig: [3000, 2] //if auto rotate enabled, set [milliseconds_btw_rotations, cycles_before_stopping]
})

</script>

<div id="canadaprovinces" class="glidecontentwrapper">

<div class="glidecontent"> By Placing the feature box code from above in here and changing the div classes with in the feature box code
<img src="http://i11.tinypic.com/8efzmmf.jpg" style="float: left; padding: 5px" />
British Columbia is the westernmost of Canada's provinces and is famed for its natural beauty. It's capital is Victoria, located at the southeastern tip of Vancouver Island. BC's most populous city is Vancouver, located in southwest corner of the BC mainland called the Lower Mainland.
</div>

<div class="glidecontent">
<img src="http://i15.tinypic.com/72vilba.jpg" style="float: right; padding: 5px"/>
Ontario is a province located in the central part of Canada, the largest by population and second largest, after Quebec in total area. Toronto, the capital of Ontario, is the centre of Canada's financial services and banking industry.
</div>

<div class="glidecontent">
<img src="http://i17.tinypic.com/8bg0lkx.jpg" style="float: left; padding: 5px"/>
Yukon, still commonly referred to as "The Yukon Territory", is the westernmost of Canada's three northern territories. The Yukon's major appeal is its nearly pristine nature. Tourism relies heavily on this and there are many organised outfitters and guides available to hunters and anglers and nature lovers of all sorts.
</div>

</div>

<div id="p-select" class="cssbuttonstoggler">
<a href="#" class="next"><span>Foward</span></a><a href="#" class="toc"><span>1</span></a> <a href="#" class="toc"><span>2</span></a> <a href="#" class="toc"><span>3</span>
<a href="#" class="prev"><span>Back</span></a>
</div>


I have tried different things and so far the best I can achive is all posts showing up in the glider box.

If anyone can help It would be much appreciated.

Thanks

Sonya