Help with this code!!

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with this code!!

pgk-2
Hello friends, in my wordpress i have this code in the index.php


                <div class="box-menu">
                       

Noticias

                        <ul>
                              <?php wp_list_bookmarks('title_li=&categorize=0'); ?>
                        </ul>       
                </div>

That shows in my home the links but i need show these links from shadowbox.

I try this code but not found.

                <div class="box-menu">
                       

Noticias

                        <ul>
                              <a rel="shadowbox;width=500;height=700" href="<?php wp_list_bookmarks('title_li');?>
                        </ul>       
                </div>

Can i do anything to show the direct links with shadowbox?


Reply | Threaded
Open this post in threaded view
|

Re: Help with this code!!

Wizzud
That rather depends on the capabilities of the wp_list_bookmarks() function. If that doesn't allow you to specify the rel attribute, then you will have to use javascript to find the relevant links and set them up in Shadowbox.

[It thought there was a WP Shadowbox plugin?]
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Help with this code!!

pgk-2
Hi, thanks for your answer. I can't specify the rel attribute in wp.
Yes, i have the shadowbox plugin instaled in my wordpress and then... what can i do in javascript to show the links in shadowbox?

Thanks for your help
Regards
Reply | Threaded
Open this post in threaded view
|

Re: Help with this code!!

Wizzud
See the Advanced Usage section of the documentation.

jQuery:
jQuery(document).ready(function(){
  Shadowbox.setup($('div.box-menu ul a'));
});

MooTools:
window.addEvent('domready', function(){
  Shadowbox.setup($$('div.box-menu ul a'));
});

Prototype:
document.observe('dom:loaded', function(){
  Shadowbox.setup($$('div.box-menu ul a'));
});

etc.
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Help with this code!!

pgk-2
In the header i have this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
<head>

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); if ( is_single() ) {} wp_title(); ?></title>

<link rel="start" type="text/html" href="http://www.alcantarablackgranite.com" title="Portada" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" />

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/shadowbox-base.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/shadowbox.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/shadowbox-yui.js"></script>

<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/mostrar-ocultarinformacion.js"></script>

<script type="text/javascript"> Shadowbox.loadSkin('classic', '<?php bloginfo('template_directory'); ?>/skin/'); // use the "classic" skin Shadowbox.loadLanguage('es', '<?php bloginfo('template_directory'); ?>/lang/'); // use the English language Shadowbox.loadPlayer(['img', 'qt', 'html', 'iframe'], '<?php bloginfo('template_directory'); ?>/player/'); // use img and qt players window.onload = Shadowbox.init; </script>
<script type="text/javascript"> var openShadowbox = function(content, player){ Shadowbox.open({ content: content, player: player, }); }; </script><script type="text/javascript"> document.observe('dom:loaded', function(){ Shadowbox.setup($$('div.box-menu ul a'));}); </script>


<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/AC_RunActiveContent.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/addclasskillclass.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/prototype.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/attachevent.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/tabtastic.js"></script>


<script type="text/javascript"> //<![CDATA[ document.write("<link rel='stylesheet' href='<?php bloginfo("template_directory"); ?>/tabtastic.css' type='text/css' />"); //]]> </script>



<?php wp_head(); ?>


</head>

<body>
<div id="contenedor">

        <div id="header">
               

<a href="<?php bloginfo('url'); ?>">Alcantara Black Granite


                <div class="col-left">
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/swfobject.js"></script>
    <script type="text/javascript"> swfobject.embedSWF("<?php bloginfo('template_directory'); ?>/swf/menu.swf", "flash", "665", "114", "9.0.0"); </script>                        <div id="flash">
                                <ul>
                                        <li>Productos</li>
                                        <li>Servicios</li>
                                        <li>Portfolio</li>
                                        <li>Empresa</li>
                                                                                       
                                </ul>
                        </div>

                </div>
               
                <div class="col-right">
                        <div class="box">
                                <ul>
                                        <li class="first">cuenta</li>
                                        <li>cambio
                                        <?php
                                        if(is_home()){ ?>
                                                <ul>
                                                        <li <?php if(the_language_code(true) == es){echo "style='display:none'";} ?>><a href="<?php bloginfo('url'); ?>/es">EspaƱol</li>
                                                        <li <?php if(the_language_code(true) == en){echo "style='display:none'";} ?>><a href="<?php bloginfo('url'); ?>/en">English</li>
                                                        <li <?php if(the_language_code(true) == de){echo "style='display:none'";} ?>><a href="<?php bloginfo('url'); ?>/de">Deutsch</li>
                                                </ul>

                                        <?php }else{
                                                if (have_posts()) : while (have_posts()) : the_post();{
                                                        the_translations();
                                                } endwhile; else : endif;
                                        }
                                        ?>
                                        </li>                               
                                </ul>
                        </div>
                        <form method="get" class="search" id="searchform" action="<?php bloginfo('url'); ?>/">
                                <p>
                                        <button type="submit">Buscar</button>
                                        <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
                                </p>
                        </form>
                </div>
        </div>


But not found. :(

best regards
Reply | Threaded
Open this post in threaded view
|

Re: Help with this code!!

pgk-2
hello again!!

Now i have this:

<script type="text/javascript"> document.observe('dom:loaded', function(){ Shadowbox.setup($$(''div.box-menu ul a''), { content: content, player: player, }); }); </script>
but not found, i confused :(

please help....
Reply | Threaded
Open this post in threaded view
|

Re: Help with this code!!

Wizzud
In reply to this post by pgk-2
It usually works better if you include the library (eg Prototype) and then start using it!
Also, as you've shown a template file and not the resultant HTML page, I have no idea whether you should actually be looking for 'div.box-menu ul a' or not.
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Help with this code!!

pgk-2
In reply to this post by pgk-2
Thanks you so much for your help. I do it!!! :)

This is the code:

<script type="text/javascript"> document.observe('dom:loaded', function(){ Shadowbox.init({ skipSetup: false, }); Shadowbox.setup($$('div.box-menu ul a'), { }); }); </script>
Thanks, thanks, thanks....

Best regards

You are the best