Torna indietro   Hardware Upgrade Forum > Software > Programmazione

Recensione Samsung Galaxy S26 Ultra: finalmente qualcosa di nuovo
Recensione Samsung Galaxy S26 Ultra: finalmente qualcosa di nuovo
Per diversi giorni il Galaxy S26 Ultra di Samsung è stato il nostro compagno di vita. Oltre alle conferme del colosso coreano come la qualità del display e una suite AI senza rivali, arriva il Privacy Display, un unicum nel mondo smartphone. Ci sono ancora alcuni gap che non sono riusciti a colmare lato batteria e fotocamera, seppur con alcuni miglioramenti.
Diablo II Resurrected: il nuovo DLC Reign of the Warlock
Diablo II Resurrected: il nuovo DLC Reign of the Warlock
Abbiamo provato per voi il nuovo DLC lanciato a sorpresa da Blizzard per Diablo II: Resurrected e quella che segue è una disamina dei nuovi contenuti che abbiamo avuto modo di sperimentare nel corso delle nostre sessioni di gioco, con particolare riguardo per la nuova classe dello Stregone
Deep Tech Revolution: così Area Science Park apre i laboratori alle startup
Deep Tech Revolution: così Area Science Park apre i laboratori alle startup
Siamo tornati nel parco tecnologico di Trieste per il kick-off del programma che mette a disposizione di cinque startup le infrastrutture di ricerca, dal sincrotrone Elettra ai laboratori di genomica e HPC. Roberto Pillon racconta il modello e la visione
Tutti gli articoli Tutte le news

Vai al Forum
Rispondi
 
Strumenti
Old 08-12-2009, 17:18   #1
Profeta11
Senior Member
 
Iscritto dal: Oct 2004
Messaggi: 544
[PHP] Errore parse, semplice ma non capisco

Sto montando un template per il mio fotoblog, tuttavia mi esce fuori questo errore

Parse error: parse error in /wp-content/themes/theworldin35mm/index.php on line 35

il codice è questo:

Codice PHP:
<?php
/**
 * Main index page. 
 * 
 * If we're on the homepage, then we enable all of the AJAX features. If 
 * displaying a single image, then we disable the info panel and previous/next 
 * links, instead displaying the shot info. However the EXIF panel will still
 * load. 
 *
 * If the user has clicked the 'Random' page, then we automatically redirect
 * to a random page. 
 *
 * @package TheWordIn35mm
 */
 
// Code for grabbing a random post from the database if necessary; we then redirect to the page.
if ($_GET['do'] == 'random') {
    
$random_id $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_type = 'post' AND post_password = '' AND post_status = 'publish' ORDER BY RAND() LIMIT 1");
    
wp_redirect(get_permalink($random_id));
}

//  header.
get_header();

// Begin post loop.
if (have_posts()) : while (have_posts()) : the_post(); 

    if (
is_home() || is_single()) :

        
//thumbConfig
        
$thumbConfig = array('w='.im_dim(),'q=100');

        
// post/image variables
        
$id         $post->ID;
        
$next_post get_next_post(false)         ? get_next_post(false)->ID 0;
        
$prev_post get_previous_post(false)     ? get_previous_post(false)->ID 0;
        
        
$next_post_perm get_permalink($next_post);
        
$prev_post_perm get_permalink($prev_post);

        if (!
is_null($image YapbImage::getInstanceFromDb($id)))
        {
            
$w $post->image->width;
            
$h $post->image->height;

            
$src         str_replace("&amp;""&"$image->getThumbnailHref($thumbConfig));
            
$w_thumb     $image->getThumbnailWidth($thumbConfig);
            
$h_thumb     $image->getThumbnailHeight($thumbConfig);
        }

    
?>

    <script type="text/javascript">
    function fadeCallback() {

        document.getElementById("image-border").style.backgroundImage = "none";

        if (<?php echo($prev_post);?> != 0) {
            document.getElementById("image-nav-prevlink").style.visibility = "visible";
            document.getElementById("image-nav-prevoverlay").style.display = "block";
        }
        if (<?php echo($next_post);?> != 0) {
            document.getElementById("image-nav-nextlink").style.visibility = "visible";
            document.getElementById("image-nav-nextoverlay").style.display = "block";
        }
    }

    window.onload = function() {
        var img = document.getElementById('photo');
        
        img.onload = function(evt) {
            // using custom fader since Effect.Appear() from scriptaculous
            // lacks a few things:
            // (1) callback function to do something when appear effect completes
            // (2) work with visibility style instead of display
            fade(img, 0.5, 10, fadeCallback);
        }
        
        // set img src
        img.src = '<?php echo($src); ?>';
    };

    // clears default value out of comment box
    function clearBox(box) {
        if(box.value == box.defaultValue) {
            box.value = "";
        }
    }
    </script>

<div id="image-container">    
    
    <div id="image-nav-links">
        <div id="image-nav-prevlink" style="visibility: hidden;">
            <a href="<? echo($prev_post_perm); ?>" accesskey="p" title="Previous Photo">&larr; previous</a>
        </div>
        <div id="image-nav-nextlink" style="visibility: hidden;">
            <a href="<? echo($next_post_perm); ?>" accesskey="n" title="Next Photo">next &rarr;</a>
        </div>
        <div class="clear"></div>
    </div>

    <table id="image-table" cellpadding="0" cellspacing="0" border="0" align="center">
        <tbody>
            <tr><td></td><td id="top-tr"></td><td></td></tr>
            <tr id="center-tr">
            <td id="left-td"></td>
            <td id="center-td">
            <div id="image-border">
                <img id="photo" src="<?php bloginfo('template_directory'); ?>/images/blank.gif" alt="<?php the_title() ?>" title="<?php the_title() ?>" style="width:<?=$w_thumb?>px; height:<?=$h_thumb?>px; visibility: hidden;" />
                <div id="image-nav-overlay" style="width:<?=$w_thumb?>px; height:<?=$h_thumb?>px;">
                    <a href="<? echo($prev_post_perm); ?>" id="image-nav-prevoverlay" style="display: none;"></a>
                    <a href="<? echo($next_post_perm); ?>" id="image-nav-nextoverlay" style="display: none;"></a>
                </div>
            </div>
            </td>
            <td id="right-td"></td>
            </tr>
            <tr><td></td><td id="bottom-tr"></td><td></td></tr>
        </tbody>
    </table>    

    <div id="image-info">
        <div class="image-title"><?php the_title() ?></div>
        <div class="image-comment"><a href="javascript:void(0);" onclick="Effect.toggle('comments-container','blind',{ duration: 0.75 }); return false;">Info + Comments (<?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?>)</a></div>
        <div class="clear"></div>
        <div class="image-date"><?php the_date('jS F Y');?></div>
        <div class="clear"></div>
    </div>
    
    <div id="comments-container" style="display: none;">
        <div id="image-notes">
            <div id="description">
                <h3>Notes</h3>
                <ul>
                    <li><?php the_content(); ?></li>
                </ul>
            </div>
            <div id="exif">
                <h3>EXIF</h3>
                <ul><?php yapb_exif('exiftag'':''<strong>''</strong>''<i>''</i>'?></ul>
            </div>
            <div id="exif">
            <h3>TAG</h3>
                <?php the_tags('<ul><li>','</li><li>','</li></ul>');?>
            </div>    
        </div>
        <div id="image-comments">
            <div id="comments">
                 <?php comments_template(); ?>
            </div>
            <div id="thanks">
                <p>Thanks for visiting. I really appreciate your support and comments!</p>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>    <!-- image-container //-->
    <?php endif;
//debug option
/*
echo("home - " . is_home() . "<br>");
echo("single - " . is_single() . "<br>");
echo("page - " . is_page() . "<br>");
echo("id - " . $id . "<br>");
echo("next - " . $next_post . "<br>");
echo("prev - " . $prev_post . "<br>");
echo("perm - " . $post_perm . "<br>");
echo("next - " . $next_post_perm . "<br>");
echo("prev - " . $prev_post_perm . "<br>");
echo("im_dim - " . im_dim() . "<br>");
echo("w - " . $w . "<br>");
echo("h - " . $h . "<br>");
echo("w-th - " . $w_thumb . "<br>");
echo("h-th - " . $h_thumb . "<br>");
*/
?>
<?php 
break; endwhile; endif;

get_footer(); ?>
Penso sia un errore di sintassi ma non essendo troppo pratico di php non capisco cosa sia sbagliato

Help
__________________
Ho concluso compravendite con Calipso, Dreamsequencer su PcTuner; con Goriath, Pechigno, wipe3out, Flender76 su HWU
Profeta11 è offline   Rispondi citando il messaggio o parte di esso
 Rispondi


Recensione Samsung Galaxy S26 Ultra: finalmente qualcosa di nuovo Recensione Samsung Galaxy S26 Ultra: finalmente ...
Diablo II Resurrected: il nuovo DLC Reign of the Warlock Diablo II Resurrected: il nuovo DLC Reign of the...
Deep Tech Revolution: così Area Science Park apre i laboratori alle startup Deep Tech Revolution: così Area Science P...
HP OMEN MAX 16 con RTX 5080: potenza da desktop replacement a prezzo competitivo HP OMEN MAX 16 con RTX 5080: potenza da desktop ...
Recensione Google Pixel 10a, si migliora poco ma è sempre un'ottima scelta Recensione Google Pixel 10a, si migliora poco ma...
Spotify introduce 'Taste Profile': il co...
Sole e pioggia insieme: il nuovo pannell...
AWS e Cerebras uniscono le forze: nuova ...
Windows 11: accesso al drive C: bloccato...
BYD pronta a comprare un marchio storico...
Windows 11 si prepara ai monitor oltre i...
Apple avrebbe fissato un target di vendi...
Ultimi giorni per sfruttare le Offerte d...
I migliori smartphone in offerta ora su ...
Le migliori TV delle Offerte di Primaver...
Uno dei robot più avanzati del 2025 crol...
Robot aspirapolvere con stazione automat...
Il nuovo top di gamma compatto di OPPO n...
Nilox aggiorna la sua gamma di fat e-bik...
Meta valuta tagli fino al 20% della forz...
Chromium
GPU-Z
OCCT
LibreOffice Portable
Opera One Portable
Opera One 106
CCleaner Portable
CCleaner Standard
Cpu-Z
Driver NVIDIA GeForce 546.65 WHQL
SmartFTP
Trillian
Google Chrome Portable
Google Chrome 120
VirtualBox
Tutti gli articoli Tutte le news Tutti i download

Strumenti

Regole
Non Puoi aprire nuove discussioni
Non Puoi rispondere ai messaggi
Non Puoi allegare file
Non Puoi modificare i tuoi messaggi

Il codice vB è On
Le Faccine sono On
Il codice [IMG] è On
Il codice HTML è Off
Vai al Forum


Tutti gli orari sono GMT +1. Ora sono le: 17:18.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Served by www3v