Beiträge von sternenlicht
-
-
-
moin gemeinde,
im fauna theme gibt es die möglichkeit, in der sidebar eine zusätzliche sidebar anzulegen.
das läuft über das benutzerdefinierte feld.
mann nimmt als schlüßel sidebar und fügt im wert text oder sonst was ein. mit dem amazon-plugin tut das auch wunderbar (http://web9.server09.ultraserver.org/test/?p=118), ich würde jedoch gern die related links (http://www.texto.de/texto/verschie…-sidebar-in-wp/)
dort aufrufen. run-php (exec-php produziert einen datenbankfehler) hab ich schon installiert, jedoch bekomm ich nur ein leeres feld. *gnarf*den tip mit runphp hab ich vom ersteller des themes, aber weiter weiß er auch nicht....
ich hoffe, mir kann jemand weiterhelfen.
-
Zitat von rftc
3. Mein Hauptproblem: Ich möchte einen Kalender in diesem Template und hab bis jetzt nicht rausgefunden, ob ich dafür ein spezielles Plugin benötige. Einige Einträge lauten, "füg einfach in der sidebar.php dies ein:
<li id="calendar">
<h2><?php _e(''); ?></h2>
<?php get_calendar(); ?>hast du evtl. den abschließenden
vergessen?
-
moin
nachdem ich mehrfach drauf angesprochen wurde, daß es lästig ist, das sich die amazon-verlinkungen im gleichen fenster öffnen, würde ich gern das obige plugin umschreiben. gleichzeitig würde ich es auf deutsch übersetzten.
kann mir jemand sagen, wo ich den code ändern muß, büde?
PHP
Alles anzeigen<?php class WP_Amazon { var $version; var $country; var $associate_id; var $subscription_id; var $plugin_home_url; function wp_amazon () { // load i18n translations load_plugin_textdomain('wpamazon'); // initialize all the variables $this->version = '1.3.2'; $this->plugin_home_url = 'http://manalang.com/wp-amazon'; $this->country = get_option('wpamazon_country'); $this->associate_id = get_option('wpamazon_associate_id'); $this->subscription_id = get_option('wpamazon_subscription_id'); // Set defaults if properties aren't set if ( !$this->country ) update_option('wpamazon_country', 'US'); if ( !$this->associate_id ) update_option('wpamazon_associate_id', 'manalangcom-20'); if ( !$this->subscription_id) update_option('wpamazon_subscription_id', '0EMV44A9A5YT1RVDGZ82'); } function check_for_updates() { $request = "GET http://svn.wp-plugins.org/wp-amazon/trunks/latest-version.txt HTTP/1.1\n"; $request .= "Host: svn.wp-plugins.org\n"; $request .= "Referer: " . $_SERVER["SCRIPT_URI"] . "\n"; $request .= "Connection: close\n"; $request .= "\n"; $fp = fsockopen("svn.wp-plugins.org", 80); fputs($fp, $request); while(!feof($fp)) { $result .= fgets($fp, 128); } fclose($fp); $result = split("\r\n", $result); foreach($result as $k) { if(!strncmp($k, "Version: ", 9)) { $result = $k; break; } } $version = split(": ", $k); $version = $version[1]; return $version; } function options_page() { if(isset($_POST['submitted'])) { update_option('wpamazon_country', $_POST['wpamazon_country']); update_option('wpamazon_associate_id', $_POST['wpamazon_associate_id']); update_option('wpamazon_subscription_id', $_POST['wpamazon_subscription_id']); //get any new variables $this->wp_amazon(); echo '<div class="updated"><p><strong>' . __('Options saved.', 'wpamazon') . '</strong></p></div>'; } $this->country = get_option('wpamazon_country'); $this->associate_id = get_option('wpamazon_associate_id'); $this->subscription_id = get_option('wpamazon_subscription_id'); $var[$this->country] = "selected"; $formaction = $_SERVER['PHP_SELF'] . "?page=wp-amazon-plugin.php"; // Check if there is a new version of WP-Amazon $version_synch_val = get_option('wpamazon_check_version'); if ( empty($version_synch_val) ) add_option('wpamazon_check_version', '0'); if (get_option('wpamazon_check_version') < ( time() - 1200 ) ) { $latest_version = $this->check_for_updates(); update_option('wpamazon_check_version', time()); update_option('wpamazon_latest_version', $latest_version); } else { $latest_version = get_option('wpamazon_latest_version'); } if ($this->version != $latest_version ) $update = "<a href=\"$this->plugin_home_url\" style=\"color:red\">Click here to get the latest update.</a>"; // Start outputting XHMTL ?> <div class="wrap"> <h2><?php _e('General Options', 'wpamazon'); ?></h2> <form name="wpamazon_options" method="post" action="<?php echo $formaction; ?>"> <input type="hidden" name="submitted" value="1" /> <fieldset class="options"> <legend> <label><?php _e('Default Country', 'wpamazon'); ?></label> </legend> <p> <?php _e('Which Amazon country site would you like as your default? Currently, Amazon\'s E-Commerce Service works with the following countries: Canada, France, Germany, Great Britain, Japan, and United States', 'wpamazon'); ?> </p> <table width="100%" cellspacing="2" cellpadding="5" class="editform"> <tr> <th width="33%" valign="top" scope="row"><?php _e('Default Country:', 'wpamazon'); ?> </th> <td> <select name="wpamazon_country"> <option value="CA" <?php echo $var['CA']; ?>><?php _e('Canada', 'wpamazon'); ?></option> <option value="FR" <?php echo $var['FR']; ?>><?php _e('France', 'wpamazon'); ?></option> <option value="UK" <?php echo $var['UK']; ?>><?php _e('Great Britain', 'wpamazon'); ?></option> <option value="DE" <?php echo $var['DE']; ?>><?php _e('Germany', 'wpamazon'); ?></option> <option value="JP" <?php echo $var['JP']; ?>><?php _e('Japan', 'wpamazon'); ?></option> <option value="US" <?php echo $var['US']; ?>><?php _e('United States', 'wpamazon'); ?></option> </select> </td> </tr> </table> </fieldset> <fieldset class="options"> <legend> <label><?php _e('Associates ID', 'wpamazon'); ?></label> </legend> <p> <?php _e('Amazon has an affiliate program called Amazon Associates. This program allows you to earn money for refering customers to Amazon. To apply for the Associates Program, visit the <a href="http://www.amazon.com/associates">Amazon Associates website</a> for details.', 'wpamazon'); ?> </p> <p> <?php _e('You can chose to have WP-Amazon apply your Associate ID to any Amazon products you post via WP-Amazon — just specify your Associate ID here.', 'wpamazon'); ?> </p> <table width="100%" cellspacing="2" cellpadding="5" class="editform"> <tr> <th width="33%" valign="top" scope="row"><?php _e('Associate ID:', 'wpamazon'); ?> </th> <td> <input name="wpamazon_associate_id" type="text" id="wpamazon_associate_id" value="<?php echo $this->associate_id; ?>" size="50" /><br /> </td> </tr> </table> </fieldset> <fieldset class="options"> <legend> <label><?php _e('Amazon E-Commerce Service (ECS) Subscription ID', 'wpamazon'); ?></label> </legend> <p> <?php _e('Amazon\'s E-Commerce Service is what makes this WordPress plugin possible. Amazon ECS developers must use an ECS Subscription ID in order to access Amazon\'s web service.', 'wpamazon'); ?> </p> <p> <?php _e('You don\'t need to change this Subscription ID to use WP-Amazon, you can simply use the ID provided.', 'wpamazon'); ?> </p> <table width="100%" cellspacing="2" cellpadding="5" class="editform"> <tr> <th width="33%" valign="top" scope="row"><?php _e('Subscription ID:', 'wpamazon'); ?> </th> <td> <input name="wpamazon_subscription_id" type="text" id="wpamazon_subscription_id" value="<?php echo $this->subscription_id; ?>" size="50" /><br /> </td> </tr> </table> </fieldset> <p><?php printf(__('This version of WP-Amazon is %1$s and the latest version is %2$s. %3$s', 'wpamazon'), $this->version, $latest_version, $update); ?></p> <p class="submit"> <input type="submit" name="Submit" value="<?php _e('Update Options »', 'wpamazon'); ?>" /> </p> </form> </div> <?php } // Adds javascript function to launch a new window for the search page function add_head() { if (!(strstr($_SERVER['PHP_SELF'], 'post.php') || strstr($_SERVER['PHP_SELF'], 'page-new.php')) || $_GET["action"] == 'editcomment') return 0; ?> <script language="JavaScript" type="text/javascript"> <!-- function amazonPopup(link, windowname) { if (!window.focus) return true; var href; if (typeof(link) == "string") href = link; else href = link.href; window.open(href, windowname, "width=600,height=600,scrollbars=yes"); return false; } //--> </script> <?php } function add_link() { if( (!strstr($_SERVER['PHP_SELF'], 'post.php') && !strstr($_SERVER['PHP_SELF'], 'page-new.php')) || $_GET["action"] == 'editcomment' ) return 0; ?> <div id="wp-amazon" style="margin-bottom:10px;"> <a href="../wp-content/plugins/wp-amazon.php" onclick="return amazonPopup(this, 'SearchAmazon')">Insert content from Amazon</a> </div> <script language="JavaScript" type="text/javascript"> <!-- var pingBack = document.getElementById("pingback"); if (pingBack == null) var pingBack = document.getElementById("post_pingback"); var AmazonLink = document.getElementById("wp-amazon"); pingBack.parentNode.insertBefore(AmazonLink, pingBack); //--> </script> <?php } function show_options_page() { global $wp_amazon; add_options_page(__('WP-Amazon Options', 'wpamazon'), __('Amazon', 'wpamazon'), 8, __FILE__, array(&$wp_amazon, 'options_page')); } } // Class WP_Amazon // Add actions to call the function add_action('plugins_loaded', create_function('$a', 'global $wp_amazon; $wp_amazon = new WP_Amazon;')); add_action('admin_head', array(&$wp_amazon, 'add_head')); add_action('admin_footer', array(&$wp_amazon, 'add_link')); add_action('admin_menu', array(&$wp_amazon, 'show_options_page')); ?> -
Zitat von Sidney440
1. In der amm_extras.php kannst du mehrere Templates erstellen, auch eigene. Achte mal darauf, dass du auch das richtige veränderst (oder erstelle gleich dein eigenes, Hilfe dazu ist auf der HP zu finden).
2. Statt $amm->rating() eben $amm->fancyRatings()Sid
guggst du oben
Zitatmein englisch reicht nur zum krimi lesen und theme übersetzen.
-
-
ich weiß ja nicht, ob das klappt...
aber versuch mal in die klammern'optioncount=1 '
zu setzten, bei den rubriken zeigt es dann die anzahl der einträge an.
-
-
http://www.webspaceworks.com/resources/cat/wp-plugins/30/
funktioniert wunderbar, gibt es auch für pages.
-
findste? ich hab gestern 2 stunde damit verplempert, das so hinzubekommen:
http://web9.server09.ultraserver.org/star/?cat=26 und bin gescheitert. mein englisch reicht nur zum krimi lesen und theme übersetzen.
-
wenn ich das beim theme Neuron, classic oder auch bei fauna aktiviere hab ich ne fette überschritt mit "important message". und nicht nur ich, wie ich dort im forum lese.
-
warum nutzt ihr nicht http://www.semiologic.com/software/static-front/
dann einfach im adminbereich eine seite mit dem titel home anlegen, text druff, feddisch

-
archivist
dann frag ich mal nach den einstellungen für archivist:
PHP
Alles anzeigen//----------------------------EDIT HERE------------------------------------------------- $archivist_settings['number_of_posts'] = 3; $archivist_settings['random'] = false;//selected posts should be sorted randomly or by time? $archivist_settings['frontpage_position'] = 1;//indexed from 0! $archivist_settings['from_categories'] = "";//list of IDs of categories separated by commas. "" (empty string) means that this rule is not used $archivist_settings['older_than'] = 30;//days. -1 means that this rule is not used $archivist_settings['newer_than'] = -1;//days. -1 means that this rule is not used $archivist_settings['keep_the_limit_of_posts_per_page'] = false;//if 'true' then the 'random posts' will be added to the number of posts already shown on the front page //if 'false' then last post(s) will be thrown away and random posts will be added where they are supposed to be //the point is that then you'll have a lack of post(s) between the first and second page...:( /* if you have installed Polyglot (http://fredfred.net/skriker/index.php/polyglot) you can use different language versions in $archivist_settings['title'] example: $archivist_settings['title'] = '<lang_cs>Z archivu: </lang_cs><lang_en>From the Archive: </lang_en>%title'; */ //%title will be replace with original post title $archivist_settings['title'] = 'Das Neuste: %title'; /*===============for advanced users======================= you can use something more sophisticated to specify 'older_than' and 'newer_than' values $archivist_settings['newer_than'] = ( time() - mktime(0,0,0,5,1,2005) )/ (60*60*24); this example allows only posts newer than 1st of May 2005 hint from PHP manual: mktime ( [int hour [, int minute [, int second [, int month [, int day [, int year [, int is_dst]]]]]]] ) */ //###########STOP EDITING HERE####################### add_filter('the_posts','archivist_main'); function archivist_main($posts){ global $archivist_settings, $wpdb, $wp_query, $paged; if(!$wp_query->is_home || $paged > 1 || $wp_query->query_vars['paged'] > 1)//random post should be only on the front page { return $posts; } //co-operation with Polyglot if(function_exists(lang_picker_respect_more)){ $archivist_settings['title'] = lang_picker_respect_more($archivist_settings['title']); } $my_posts = array(); $j = count($posts);//trick to keep the limit of posts per page for($i = 0; $i <= $j; $i++){ $post = $posts[$i]; if($i == $archivist_settings['frontpage_position'] ){ $oldest_post = $posts[count($posts)-1]->post_date_gmt;//to select posts that are not on the page already $now = current_time('mysql', 1); //let's start with query $query = "SELECT * FROM $wpdb->posts "; //if you want to select only from defined categories if($archivist_settings['from_categories'] != ""){ $query .=",$wpdb->post2cat "; } $query .= " WHERE post_status = 'publish' AND post_date_gmt <= '$oldest_post' "; //do we have an older_than rule? if($archivist_settings['older_than'] > -1) $query .= "AND post_date_gmt <= DATE_SUB('$now', INTERVAL {$archivist_settings['older_than']} DAY) "; //do we have a newer_than rule with reasonable value? if($archivist_settings['newer_than'] > -1 && $archivist_settings['newer_than'] >= $archivist_settings['older_than'] ) $query .= "AND post_date_gmt >= DATE_SUB('$now', INTERVAL {$archivist_settings['newer_than']} DAY) "; //select only from defined categories if($archivist_settings['from_categories'] != ""){ $query .="AND post_ID = ID AND ("; $tok = strtok($archivist_settings['from_categories'], ","); $first = true; while ($tok) { $foo = trim($tok); if(!$first){ $query .=' OR ';} else {$first = false;} $query .="category_ID = '$foo' "; $tok = strtok(","); } $query .= ') '; } //select randomly or not? if($archivist_settings['random']){ $orderby = 'rand()'; } else { $orderby = 'post_date_gmt DESC'; } //some other plugins could show their power here $orderby = apply_filters('posts_orderby', $orderby); $query .= "ORDER BY $orderby "; $query .= " LIMIT {$archivist_settings['number_of_posts']}"; if($drafts = $wpdb->get_results($query)){ foreach($drafts as $draft){ $draft->post_title = str_replace("%title", $draft->post_title, $archivist_settings['title'] ); $my_posts[] = $draft; } //we don't want to exceed the limit of posts per page if($archivist_settings['keep_the_limit_of_posts_per_page']){ $j -= count($drafts); } } } if($i < $j){ $my_posts[] = $post; } } update_post_caches($my_posts) ; return $my_posts; } ?> -
-
:anbetundhuldige:
die englische anleitung ist so banane.....
ZitatTrotzdem erscheinen nach wie vor die englischen Wörter in der Sidebar. In einer anderen Datei habe ich "Author:" nicht gefunden, also muss es zumindest die richtige Datei sein...! (Hat das was mit den Schreibrechten an diesen Dateien zu tun? Die sind bei mir alle auf 777, weil ich sie mit dem WP Plugin Editor bearbeiten wollte, funktionierte aber nicht...)
schau mal in deinen templates nach, wie autor dort geschrieben wird...
-
ich krieg das gar nicht installiert.... kannst mir das mal per pm mailen, büdde

-
moin
im neuen blog hätte ich gern statt dem link zu den News die letzten 5 einträge als excerpt auf der startseite unter dem bild.
ich habs erst mit archivist http://fredfred.net/skriker/index.php/archivist/ versucht, bring das teil aber nicht dazu, mir die letzten 5 posts aus der Kat. 4 zu zeigen.
nachdem ich dann im codex gelesen habe, hab ich den code gefunden
PHP<ul> <?php $posts = get_posts('numberposts=5&offset=1&category=4'); foreach($posts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> --- <?php the_excerpt(); ?></li> <?php endforeach; ?> </ul>aber wie binde ich den auf meiner startseite ein?
-
bisher hab ich dazu nur adhesive von http://redalt.com/wiki/Adhesive gefunden...
daß aber diese üble "important message" meldung bringt.
bei fauna (guggst du meine signatur) gibt es dafür eine bestimmte sonderkategory, die das anzeigt.
-
große auswahl an themes:
http://www.alexking.org/software/wordpress/theme_browser.php
und 20 sec googlen :