Home › Forum › WordPress Beta › 2 problemi dopo l’aggiornamento WP 2.1
-
AutorePost
-
-
3 Febbraio 2007 alle 19:04 #3103max31055Partecipante
Innanzi tutto un saluto a tutti gli utenti del forum.
Essendo a digiuno di codici e comunque linguaggi di programmazione, mi trovo in difficoltà con l’aggiornamento di WP. Diciamo che funziona tutto, ma ho da segnalare due errori che mi riportano questo codice.
Il primo riguarda il widget LINKS WITH SYLE…. il codice di errore è questo:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
SELECT cat_id, cat_name FROM.
Potrete vedere direttamente sul sito.
L’altro è un errore in bacheca, a destra sotto la dicitura STATISTICHE.
Inoltre non viene visualizzato il numero dei commenti.
Prima dell’aggiornamento funzionava tutto.
Ringrazio anticipatamente per eventuali soluzioni.
Massimo
-
4 Febbraio 2007 alle 7:25 #43257PseudoTecnicoPartecipante
Per il secondo errore sulle statistiche ho risolto in questo modo
http://www.pseudotecnico.org/blog/2007/01/27/errore-nella-bacheca-wordpress-21/
-
4 Febbraio 2007 alle 9:11 #43258max31055Partecipante
Ti ringrazio infinitamente!
Ora il problema della bacheca è risolto.
Rimane l’altro errore che riscontro nella sidebar riportato dal widget LINKS WITH SYLE.
-
4 Febbraio 2007 alle 9:29 #43259FreeplePartecipante
Ciao Max!
Prova a vedere se qui c’è gia il sistema aggiornato alla 2.1:
http://automattic.com/code/widgets/
Non dovrebbe comunque tardare nel caso non ci fosse …
A presto, ciao!
-
4 Febbraio 2007 alle 9:38 #43260max31055Partecipante
Mi dicono che l’errore potrebbe risiedere qui..
}
function widget_links($args) {
global $wp_db_version;
extract($args);
if ( $wp_db_version < 3582 ) {
// This ONLY works with li/h2 sidebars.
get_links_list();
} else {
wp_list_bookmarks(array('title_before'=>$before_title, 'title_after'=>$after_title));
}
Ma come ho detto, non capendo nulla di codici vari non so se sia vero ne, quindi, quale possa essere l’errore.
-
4 Febbraio 2007 alle 11:25 #43261max31055Partecipante
Grazie Filippo infatti ho scaricato il plugin ed è diverso dal precedente, proprio nella parte di codice che ho messo sopra. Ma ho scoperto che non il problema non deriva dal codice che ho elencato sopra. In effetti quel pezzo di codice si riferisce al widget chiamato LINK e non LINKS WITH STYLE….
Insomma non ci capisco più nulla!!! ((
-
4 Febbraio 2007 alle 14:24 #43265max31055Partecipante
Penso di avere trovato la parte di codice del widget LINKS WITH STYLE….
si trova nel file funtion.php del mio tema greyblog ed è questo..
function widget_links_with_style() {
global $wpdb;
$link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
foreach ($link_cats as $link_cat) {
?>
<h2><?php echo $link_cat->cat_name; ?></h2>
<ul>
<?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'rand', TRUE, TRUE, -1, TRUE); ?>
</ul>
<?php } ?>
<?php }
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__(' Links With Style'), 'widget_links_with_style');
Qualcuno saprebbe come modificarla?
-
4 Febbraio 2007 alle 15:39 #43268SteveAglAmministratore del forum
FROM $wpdb->linkcategories
la tabella in questione non esiste più in WP 2.1. Quindi il plugin non è compatibile, a meno che non sostituisci
FROM $wpdb->linkcategories
conFROM $wpdb->categories
-
4 Febbraio 2007 alle 19:17 #43271max31055Partecipante
Ho provato a fare come mi hai detto. Qualcosa è cambiato, nel senso che ora non riporta errore ma l’elenco che compare, invece di essere quello dei link inseriti nel blogroll, è quello delle categorie.
Forse si dovrà cambiare qualche altra cosa.
-
4 Febbraio 2007 alle 20:35 #43273max31055Partecipante
Aggiorno la Situazione….
Ora sono riuscito a fare elencare le informazioni che restituiva originariamente il widget in questione..
anche grazie all’impulso di mrbrown.
Ci siamo quasi… ma non è ancora tutto a posto. Nel senso che mi riperte tutto il contenuto del blogroll tante volte quanti sono il link che lo compongono.
Metto qui il codice per chiedere come fare a far si che l’elenco non si ripeta.
if ( function_exists(‘register_sidebar_widget’) )
register_sidebar_widget(__(‘Search’), ‘widget_greyblog_search’);
function widget_links_with_style() {
global $wpdb;
$link_cats = $wpdb->get_results("SELECT link_id, link_name FROM $wpdb->links");
foreach ($link_cats as $link_cat) {
?>
<h2><?php echo $link_cat->cat_name; ?></h2>
<ul>
<?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'rand', TRUE, TRUE, -1, TRUE); ?>
</ul>
<?php } ?>
<?php }
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__(' Links With Style'), 'widget_links_with_style');
-
4 Febbraio 2007 alle 21:11 #43274max31055Partecipante
Ho risolto! Almeno per ora sembra funzionare.
Questo è il codice che mi genera il risultato giusto… spero possa esere utile a qualcuno.
<?php
}
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__('Search'), 'widget_greyblog_search');
function widget_links_with_style() {
global $wpdb;
$link_cats = $wpdb->get_results("SELECT link_id, link_name FROM $wpdb->links");
{
?>
<h2><?php _e('Blogroll'); ?></h2>
<ul>
<?php get_links($link_cat->cat_id, '<li>', '</li>', '<br />', FALSE, 'rand', TRUE, TRUE, -1, TRUE); ?>
</ul>
<?php } ?>
<?php }
if ( function_exists('register_sidebar_widget') )
register_sidebar_widget(__(' Links With Style'), 'widget_links_with_style');
?>
-
5 Febbraio 2007 alle 13:20 #43288SteveAglAmministratore del forum
Qualcosa è cambiato, nel senso che ora non riporta errore ma l’elenco che compare, invece di essere quello dei link inseriti nel blogroll, è quello delle categorie.
In WP 2.1 la tabella delle categorie è stata resa unica per Articoli e Link.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.