To wp-to-twitter plugin για wordpress είναι ένας πολύ ωραίος τρόπος για να δημοσιεύετε αυτόματα τα άρθρα σας στο Twitter.
Το Plug-in δυστυχώς έχει ένα μικρό πρόβλημα. Οι ελληνικοί τίτλοι δεν εμφανίζονται σωστά όταν έχουν μεγάλο μέγεθος.
Μια εύκολη και γρήγορη λύση είναι να απενεργοποιήσετε το λεγόμενο truncation.
Στο αρχείο "wp-to-twitter.php":
Κάτω από το function jd_truncate_tweet: (Γραμμή 208)
Κάνετε comment τις γραμμές 209-226 εκτός της γραμμής 213.
Το αποτέλεσμα μοιάζει κάπως έτσι:
// $twit_length = strlen( $sentence );
// $title_length = strlen( $thisposttitle );
// $blog_length = strlen( $thisblogtitle );
// if ( ( ( $twit_length + $title_length ) - 7 ) < 140 ) {
$sentence = str_ireplace( '#title#', $thisposttitle, $sentence );
// $twit_length = strlen( $sentence );
// } else {
// $thisposttitle = substr( $thisposttitle, 0, ( 140- ( $twit_length-3 ) ) ) . "...";
// $sentence = str_ireplace ( '#title#', $thisposttitle, $sentence );
// $twit_length = strlen( $sentence );
// }
// if ( ( ( $twit_length + $blog_length ) - 6 ) < 140 ) {
// $sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence );
// $twit_length = strlen( $sentence );
// } else {
// $thisblogtitle = substr( $thisblogtitle, 0, ( 140-( $twit_length-3 ) ) ) . "...";
// $sentence = str_ireplace ( '#blog#',$thisblogtitle,$sentence );
// }
0 σχόλια:
Δημοσίευση σχολίου