Help with this code!!

8 Messages Forum Options Options
Permalink
PGK
Help with this code!!
Reply Threaded More
Print post
Permalink
Hello friends, in my wordpress i have this code in the index.php


                <div class="box-menu">
                        <h2>Noticias</h2>
                        <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">
                        <h2>Noticias</h2>
                        <ul>
                             
                        </ul>
                </div>

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


Wizzud
Re: Help with this code!!
Reply Threaded More
Print post
Permalink
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?]
PGK
Re: Help with this code!!
Reply Threaded More
Print post
Permalink
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
Wizzud
Re: Help with this code!!
Reply Threaded More
Print post
Permalink
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.
PGK
Re: Help with this code!!
Reply Threaded More
Print post
Permalink
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>

<!--[if lt IE 7]>
<link rel="stylesheet" href="<?php bloginfo('template_directory');?>/ie6.css" type="text/css" />
<script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script>
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="<?php bloginfo('template_directory');?>/ie7.css" type="text/css" />
<![endif]-->

<?php wp_head(); ?>


</head>

<body>
<div id="contenedor">

        <div id="header">
                <h1>">Alcantara Black Granite</h1>

                <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><!-- col left -->
               
                <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'";} ?>>/es">EspaƱol</li>
                                                        <li <?php if(the_language_code(true) == en){echo "style='display:none'";} ?>>/en">English</li>
                                                        <li <?php if(the_language_code(true) == de){echo "style='display:none'";} ?>>/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><!-- col right -->
        </div><!-- header -->


But not found. :(

best regards
PGK
Re: Help with this code!!
Reply Threaded More
Print post
Permalink
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....
Wizzud
Re: Help with this code!!
Reply Threaded More
Print post
Permalink
In reply to this post by PGK
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.
PGK
Re: Help with this code!!
Reply Threaded More
Print post
Permalink
In reply to this post by PGK
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