• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Viele hassen ihn, manche schwören auf ihn, wir aber möchten unbedingt sehen, welche Bilder Ihr vor Eurem geistigen Auge bzw. vor der Linse Eures iPhone oder iPad sehen könnt, wenn Ihr dieses Wort hört oder lest. Macht mit und beteiligt Euch an unserem Frühjahrsputz ---> Klick

WordPress PHP

ZENcom

Goldener Apfel der Eris
Registriert
30.03.06
Beiträge
2.600
Hallo :)

Ich schlage mich nun schon seit Stunden mit WP herum. Im Forum dort habe ich mich bereits angemeldet, aber die Bestätigungsmail ist bisher nicht eingetroffen. Möglicherweise kann mir von euch einer helfen. WP ist ja durchaus sehr weit verbreitet.

Zu meinem Problem: Ich habe hier zwei Buttons die ich gerne in meinen Blog einbauen möchte. Zum einen ist es ein PayPal-Button ($-)) und zum anderen ein CC-Label-Button. Die beiden Buttons sollen hier hin ->

butplace.jpg


Die PHP-Templates in den Theme-Editor habe ich schon versucht zu durchschauen, hab es leider aber noch nicht geblickt wo ich die Codezeilen der beiden Buttons einfügen muss.

Danke für eure Unterstützung :)
 
Zuletzt bearbeitet:

stk

Grünapfel
Registriert
05.01.04
Beiträge
7.141
Moin,

am einfachsten bringst das in der footer.php Datei unter. Damit ist sichergestellt, das die Buttons immer auf allen Seiten zu sehen sind.

Gruß Stefan
 

macindy

Stahls Winterprinz
Registriert
21.12.03
Beiträge
5.153
Bild ist leider nicht zu sehen. Link 404
 

ZENcom

Goldener Apfel der Eris
Registriert
30.03.06
Beiträge
2.600
excuse! :innocent: Nebenbei stecke ich an einer Lösung für ein FTProblem…

Ok, den Footer hab ich, aber wo da? :eek:

Code:
<?php
	/*

		Hi,

		Please DO NOT remove the link to my website from the footer. I have
		been working hard to make this theme and you have downloaded it for
		FREE. This is all I ask from you in return for Mandigo which didn't
		cost you a cent.

		Thank you.

		tom

	*/

	global $mandigo_options, $dirs, $wpmu;
?>
</tr>
</table>
<?php
	// HTML Inserts: footer
	echo get_option('mandigo_inserts_footer');
?>
</div>

<div id="footer" class="png">
	<p>
<?php
	// if this is WordPress MU
	if ($wpmu) {
		$current_site = get_current_site();
?>
		<?php _e('Powered by <a href="http://mu.wordpress.org/">WordPress MU</a>', 'mandigo'); ?> &amp; hosted by <a href="http://<?php echo $current_site->domain . $current_site->path ?>"><?php echo $current_site->site_name ?></a><br />
		<a href="http://<?php echo $current_site->domain . $current_site->path ?>wp-signup.php">Create a new blog</a> and join in the fun! <a href="http://www.onehertz.com/portfolio/wordpress/" target="_blank" title="WordPress MU themes">Mandigo theme</a> by tom

<?php
	}
	
	// if this is a regular WordPress
	else {
?>
		<?php _e('Powered by <a href="http://wordpress.org/">WordPress</a>', 'mandigo'); ?>, <a href="http://www.onehertz.com/portfolio/wordpress/" target="_blank" title="WordPress themes">Mandigo theme</a> by tom.

<?php
	}



	// the rss links
?>
		<br /><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php echo $dirs['www']['scheme']; ?>images/rss_s.gif" alt="" /> <?php _e('Entries (RSS)', 'mandigo'); ?></a>
		<?php _e('and', 'mandigo'); ?> <a href="<?php bloginfo('comments_rss2_url'); ?>"><img src="<?php echo $dirs['www']['scheme']; ?>images/rss_s.gif" alt="" /> <?php _e('Comments (RSS)', 'mandigo'); ?></a>.
<?php


	// if we chose to display statistics at the bottom
	if ($mandigo_options['footer_statistics']) {
?>
		<br /><?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds.
<?php
	}
?>
	</p>
</div>
</div>

<?php
	// WordPress footer
	wp_footer();

	// set the theorical max-width value for the content column
	switch ($mandigo_options['layout_width']) {
		case 1024:
			switch ($mandigo_options['sidebar_count']) {
				case 0:
					$maxw = 915;
					break;
				case 1:
					$maxw = 685;
					break;
				case 2:
					$maxw = 455;
					break;
			}
			break;
		case 800:
			switch ($mandigo_options['sidebar_count']) {
				case 0:
					$maxw = 691;
					break;
				case 1:
				case 2:
					$maxw = 461;
					break;
			}
			break;
	}
?>

<script type="text/javascript">
<!-- // <![CDATA[

	jQuery(document).ready(function() {
		jQuery('#rssicon, #searchsubmit').hover(
			function() { this.src = this.src.replace('.gif','_hover.gif'); },
			function() { this.src = this.src.replace('_hover.gif','.gif'); }
		);

		jQuery('.entry img[align=left]' ).addClass('alignleft' );
		jQuery('.entry img[align=right]').addClass('alignright');
		
		if (jQuery.browser.msie) {
			if (/^[56]/.test(jQuery.browser.version)) {
				jQuery.ifixpng('<?php echo $dirs['www']['images']; ?>1x1.gif');
				jQuery('body, .png').ifixpng();
				jQuery('.commentlist .avatar').height(36);
			}

<?php



	// if the 'pre whitespace' fix is enabled
	if ($mandigo_options['fixes_whitespace_pre']) {
?>
			jQuery('*').each(function() { if (this.style.whiteSpace == 'pre') jQuery(this).css({'white-space':'normal'}); });
<?php
	}
?>
		}
		
		jQuery('p:has(.dropcap)').append('<br class="clear"/>');

<?php



	// if the 'strip url in comments' fix is enabled
	if ($mandigo_options['fixes_comments_1']) {
?>
		jQuery('.commentlist p a').each(function() { if (jQuery(this).width() > <?php echo $maxw; ?>) jQuery(this).text(this.innerHTML.replace(/\/([^\/])/g, '/\n$1')); });
<?php
	}



	// if the 'replace url in comments' fix is enabled
	if ($mandigo_options['fixes_comments_2']) {
?>
		jQuery('.commentlist p a').each(function() { if (jQuery(this).width() > <?php echo $maxw; ?>) jQuery(this).text('link'); });
<?php
	}



	// unless we disabled animations
	if (!$mandigo_options['disable_animations']) {
		// if we chose to collapse all posts by default,
		// have jquery hide all containers which have the .entry class
		if ($mandigo_options['collapse_posts']) {
?>
		jQuery('.entry').hide();
<?php
		}
?>
		togglePost = function(id) {
			if (!id) return;
			icon = jQuery('#switch-post-'+ id +' img');
			icon.attr('src', /minus/.test(icon.attr('src')) ? icon.attr('src').replace('minus', 'plus') : icon.attr('src').replace('plus', 'minus'));
			jQuery('#post-'+ id +' .entry').animate({ height: 'toggle', opacity: 'toggle' }, 1000);
		}

		toggleComment = function(id) {
			if (!id) return;
			icon = jQuery('#switch-comment-'+ id +' img');
			icon.attr('src', /minus/.test(icon.attr('src')) ? icon.attr('src').replace('minus', 'plus') : icon.attr('src').replace('plus', 'minus'));
			jQuery('#comment-'+ id +' div.comment').animate({ height: 'toggle', opacity: 'toggle' }, 1000);
		}

		toggleSidebars = function() {
			icon = jQuery('.switch-sidebars img');
			icon.attr('src', /hide/.test(icon.attr('src')) ? icon.attr('src').replace('hide', 'show') : icon.attr('src').replace('show', 'hide'));
			jQuery('.sidebars').animate({ width: 'toggle', height: 'toggle', padding: 'toggle', border: 'toggle' }, 1000);
		}

<?php /* there's also "#wp-calendar caption", but it doesn't work too well */ ?>
		jQuery('.widgettitle, .linkcat *:first, .wpg2blockwidget h3').click(function() {
			jQuery(this).siblings().animate({ height: 'toggle', opacity: 'toggle' }, 1000);
		}).css({cursor: 'n-resize'});
<?php
	} // end of 'unless animations are disabled' condition



	// if we chose to apply a drop shadow to blog name & description
	if ($mandigo_options['header_blogname_shadow']) {
?>
		jQuery('#blogname').after('<span class="blogname text-shadow">'+ jQuery('#blogname a').html() +"<\/span>");
		jQuery('#blogdesc').after('<span class="blogdesc text-shadow">'+ jQuery('#blogdesc'  ).html() +'<\/span>');
<?php
	}



	// if we chose to apply a text stroke to blog name & description
	if ($mandigo_options['header_blogname_stroke']) {
?>
		jQuery.each(['tl','tr','bl','br'],function() {
			jQuery('#blogname').after('<span class="blogname text-stroke-'+ this +'">'+ jQuery('#blogname a').html() +'<\/span>');
			jQuery('#blogdesc').after('<span class="blogdesc text-stroke-'+ this +'">'+ jQuery('#blogdesc'  ).html() +'<\/span>');
		});
<?php
	}



	// if sidebar1 should go to the left
	if ($mandigo_options['sidebar_1_position'] == 'left') {
?>
		jQuery('#sidebar1 script[src@=googlesyndication]').remove();
		t = jQuery('#sidebar1').clone();
		jQuery('#sidebar1').remove();
		jQuery('td#content').before(t);
<?php
	}



	// if sidebar2 should go to the left
	if ($mandigo_options['sidebar_2_position'] == 'left') {
?>
		jQuery('#sidebar2 script[src@=googlesyndication]').remove();
		t = jQuery('#sidebar2').clone();
		jQuery('#sidebar2').remove();
		jQuery('td#content').before(t);
<?php
	}



	// if the 'touch content' fix is enabled
	if ($mandigo_options['fixes_touch_content']) {
?>
		jQuery('#content').css({verticalAlign:'top'});
		window.onLoad = function() { jQuery('#content').css({verticalAlign:'top'}); }
<?php
	}



	// header navigation submenus
?>

		jQuery('#header .page_item').hover(
			function() {
				a  = jQuery(this).find('a' );
				ul = jQuery(this).find('ul');
				y = a.position().top + a.height();
<?php
	// apply the same alignment as the top navigation items to submenus 
	if ($mandigo_options['header_navigation_position'] == 'left') {
?>
				x = a.position().left;
<?php
	}
	elseif ($mandigo_options['header_navigation_position'] == 'right') {
?>
				x = a.position().left + a.width() - ul.width();
<?php
	}
	else {
?>
				x = a.position().left + a.width() / 2 - ul.width() / 2;
<?php
	}
?>
				ul.css({left:x, top:y}).slideDown();
			},
			function() {
				jQuery(this).find('ul').slideUp();
			}
		);
<?php



	// fix the shifted footer in the signup form on WPMU
	if ($wpmu && function_exists('signup_blog')) {
?>
		jQuery('#page').css({marginBottom:0});
<?php
	}



	// fix the gap between the sidebox and the sidebars in IE
	if (mandigo_sidebox_conditions()) {
?>

		if (jQuery.browser.msie) {
			h = jQuery('#content').height()
			  - jQuery('#sidebox .sidebars').height()
			  - jQuery('#sidebar1 .sidebars').height()
			  - parseInt(jQuery('#sidebox').css('padding-bottom'))
			  - parseInt(jQuery('#sidebox .sidebars').css('padding-top'))
			  - parseInt(jQuery('#sidebox .sidebars').css('padding-bottom'))
			  - parseInt(jQuery('#sidebar1 .sidebars').css('padding-top'))
			  - parseInt(jQuery('#sidebar1 .sidebars').css('padding-bottom'));
			if (h > 0)
				jQuery('#sidebar1').append('<div style="height: '+ h +'px"><\/div>');
		}
<?php
	}



	// alternate coloring of comments
?>

		jQuery('.commentlist li:even').addClass('alt');
});
// ]]> -->
</script>
<?php
	// HTML Inserts: very end of the page
	echo get_option('mandigo_inserts_veryend');
?>
</body>
</html>
 

drok

Klarapfel
Registriert
02.06.07
Beiträge
278
Also mit Firefox kann man relativ schnell solche Stellen finden.
Man muss versuchen diese Boxen/Text/Bilder zu markieren, Rechtsklick: "Auswahl-Quelltext anzeigen"
und dann zeigt Firefox den Quellcode der von den markierten Elementen betroffen ist.

edit: Ich könnte mir vorstellen dass es hier rein muss:

Code:
<div id="footer" class="png">
    <p>
<?php
    // if this is WordPress MU
    if ($wpmu) {
        $current_site = get_current_site();
?>
        <?php _e('Powered by <a href="http://mu.wordpress.org/">WordPress MU</a>', 'mandigo'); ?> &amp; hosted by <a href="http://<?php echo $current_site->domain . $current_site->path ?>"><?php echo $current_site->site_name ?></a><br />
        <a href="http://<?php echo $current_site->domain . $current_site->path ?>wp-signup.php">Create a new blog</a> and join in the fun! <a href="http://www.onehertz.com/portfolio/wordpress/" target="_blank" title="WordPress MU themes">Mandigo theme</a> by tom

<?php
    }
    
    // if this is a regular WordPress
    else {
?>
        <?php _e('Powered by <a href="http://wordpress.org/">WordPress</a>', 'mandigo'); ?>, <a href="http://www.onehertz.com/portfolio/wordpress/" target="_blank" title="WordPress themes">Mandigo theme</a> by tom.

[COLOR=Red]<?php echo "Dies ist ein Test"; ?>[/COLOR]

<?php
    }

// the rss links
?>
        <br /><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php echo $dirs['www']['scheme']; ?>http://www.apfeltalk.de/forum/images/rss_s.gif" alt="" /> <?php _e('Entries (RSS)', 'mandigo'); ?></a>
        <?php _e('and', 'mandigo'); ?> <a href="<?php bloginfo('comments_rss2_url'); ?>"><img src="<?php echo $dirs['www']['scheme']; ?>http://www.apfeltalk.de/forum/images/rss_s.gif" alt="" /> <?php _e('Comments (RSS)', 'mandigo'); ?></a>.
<?php

    // if we chose to display statistics at the bottom
    if ($mandigo_options['footer_statistics']) {
?>
        <br /><?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds.
<?php
    }
?>
    </p>
</div>

Das sollte natürlich innerhalb des footer-Containers beliebig verschoben werden können.
 
Zuletzt bearbeitet:

ZENcom

Goldener Apfel der Eris
Registriert
30.03.06
Beiträge
2.600
So, jetzt hab ich das mal ausprobiert…

footertest.png


…aber leider wird nach dem speichern nichts desp. angezeigt. o_O

An sich sollte es ja nicht sooo schwer sein diesen:

88x31.png


und diesen:

btn_donate_LG.gif


Button, dort:

butplace.jpg
unterzubringen.

Meine PHP5 Kenntnisse sind imho ziemlich bescheiden, aber ich lerne bereits fleissig. :)
 

NoaH11027

Weisser Rosenapfel
Registriert
14.03.06
Beiträge
777
Ich vermute mal dass das was dein Screenshot zeigt das Sidebar ist, richtig? Vielleicht zeigst du ja dazu mal den Code oder besser, verlinke doch einfach das passende Theme. Ich meine du schreibst das du eher nicht so viel Ahnung von PHP hast, da vermute ich mal dass dies kein Geheimnis ist.
Benutzt du Widgets für dein Theme oder die konventionellen Seitenelemente?

NoaH
 

nevermind

Bismarckapfel
Registriert
19.12.07
Beiträge
142
sieht mir auch nach sidebar.php aus. Was der button im footer soll weiß ich nicht. Bin allerdings kein WP Experte.
 

NoaH11027

Weisser Rosenapfel
Registriert
14.03.06
Beiträge
777
sieht mir auch nach sidebar.php aus. Was der button im footer soll weiß ich nicht. Bin allerdings kein WP Experte.

Das war ein Vorschlag weiter oben, mit der Begründung das es dann ja die ganze Zeit zu sehen wäre (die ich nicht verstehe, da sich das auch im Sidebar so einrichten lässt).
Ich habe da auch eigene Button in meinem Wordpress drin und das ist eigentlich nicht wirklich kompliziert, hängt allerdings vom Theme ab und ob Widgets im Spiel sind, weil dann wird es etwas komplexer.

Ich bin zwar auch nicht der wahnwitzige PHP Freak, aber zum anpassen und umbauen von Wordpress Themes hat es bisher immer noch sehr gut gepasst.

NoaH
 

ZENcom

Goldener Apfel der Eris
Registriert
30.03.06
Beiträge
2.600
Ich vermute mal dass das was dein Screenshot zeigt das Sidebar ist, richtig? Vielleicht zeigst du ja dazu mal den Code oder besser, verlinke doch einfach das passende Theme. Ich meine du schreibst das du eher nicht so viel Ahnung von PHP hast, da vermute ich mal dass dies kein Geheimnis ist.
Benutzt du Widgets für dein Theme oder die konventionellen Seitenelemente?

NoaH

Sidebar! Richtig.
Ich benutze Widgets.

Den Footer-Code dazu hab ich im w.o. gepostet. Möglicherweise muss man )ich) aus dem html-Code ein Widget-PHP machen?

Hier mal der Link zum Blog [-->Klick<---]
 

nevermind

Bismarckapfel
Registriert
19.12.07
Beiträge
142
wenn Du im Safari mal rechtsklick->Element Info machst, siehst Du wie deine SideBar aufgebaut ist.
<li><h4 class="widgettitle">Titel</h4><DEIN BUTTON></li>
dürfte alles inder sidebar.php liegen, und hat mit PHP nichts zu tun ;)
 

ZENcom

Goldener Apfel der Eris
Registriert
30.03.06
Beiträge
2.600
In Safari sieht das ja auch alles ganz gut aus, nur sehe ich in meiner Sidebar.php:

Code:
<?php 
	// this file defines the default sidebar
	// if you are using widgets, you do not need to edit this file

	global $mandigo_options;

	// heading level for widget title (h1, h2, div, ...)
	$tag_widget = $mandigo_options['heading_level_widget_title'];
?>
	<td id="sidebar1">
		<ul class="sidebars">
<?php
	// if wp doesn't support sidebars, or if we are not using any widget in sidebar 1
	if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1')) {

		// our search widget, defined in functions.php
		widget_mandigo_search();
		
		// our calendar widget, defined in functions.php
		widget_mandigo_calendar();



		// if we are browsing a category archive
		if (is_category()) {
			$what_youre_doing = sprintf(
				__('You are currently browsing the archives for the \'%s\' category.', 'mandigo'),
				single_cat_title('', false)
			);
		}

		// if wp supports tags and this is a tag archive
		elseif (function_exists(is_tag) && is_tag()) {
			$what_youre_doing = sprintf(
				__('You are currently browsing the %s weblog archives for posts tagged \'%s\'.', 'mandigo'),
				sprintf(
					'<a href="%s/">%s</a>',
					get_bloginfo('home'),
					get_bloginfo('name')
				),
				single_tag_title('', false)
			);
		}
		
		
		// if this is a daily archive
		elseif (is_day()) {
			$what_youre_doing = sprintf(
				__('You are currently browsing the %s weblog archives for the day %s.', 'mandigo'),
				sprintf(
					'<a href="%s/">%s</a>',
					get_bloginfo('home'),
					get_bloginfo('name')
				),
				get_the_time(__('l, F jS, Y', 'mandigo'))
			);
		}
		
		
		// if this is a monthly archive
		elseif (is_month()) {
			$what_youre_doing = sprintf(
				__('You are currently browsing the %s weblog archives for %s.', 'mandigo'),
				sprintf(
					'<a href="%s/">%s</a>',
					get_bloginfo('home'),
					get_bloginfo('name')
				),
				get_the_time(__('F, Y', 'mandigo'))
			);
		}
		
		
		// if this is a yearly archive
		elseif (is_year()) {
			$what_youre_doing = sprintf(
				__('You are currently browsing the %s weblog archives for the year %s.', 'mandigo'),
				sprintf(
					'<a href="%s/">%s</a>',
					get_bloginfo('home'),
					get_bloginfo('name')
				),
				get_the_time('Y')
			);
		}
		
		
		// if this is a search result
		elseif (is_search()) {
			$what_youre_doing = sprintf(
				__('You have searched the %s weblog archives for %s. If you are unable to find anything in these search results, you can try one of these links.', 'mandigo'),
				sprintf(
					'<a href="%s/">%s</a>',
					get_bloginfo('home'),
					get_bloginfo('name')
				),
				'<strong>\''. wp_specialchars($s) .'\'</strong>'
			);
		}
		
		
		// otherwise, not sure when this is triggered
		elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
			$what_youre_doing = sprintf(
				__('You are currently browsing the %s weblog archives.', 'mandigo'),
				sprintf(
					'<a href="%s/">%s</a>',
					get_bloginfo('home'),
					get_bloginfo('name')
				)
			);
		}

		// make sure the variable has been set
		if ($what_youre_doing) {
?>
			<li><?php echo $what_youre_doing; ?></li>
<?php
		}
		
		
		// the list of pages
		wp_list_pages(
			array(
				'sort_column' => 'menu_order',
				'title_li'    => sprintf(
					'<%s class="widgettitle">%s</%s>',
					$tag_widget,
					str_replace('&', '%26', __('Pages', 'mandigo')),
					$tag_widget
				),
			)
		);
?>

			<li><<?php echo $tag_widget; ?> class="widgettitle"><?php _e('Categories', 'mandigo'); ?></<?php echo $tag_widget; ?>>
				<ul>
<?php
		// the list of categories
		wp_list_cats(
			array(
				'sort_column'  => 'name',
				'optioncount'  => 1,
				'hide_empty'   => 0,
				'hierarchical' => 1,
			)
		);
?>
				</ul>
			</li>

<?php
		// if wordpress supports tags
		if (function_exists('wp_tag_cloud')) {
?>
			<li><<?php echo $tag_widget; ?> class="widgettitle"><?php _e('Tags', 'mandigo'); ?></<?php echo $tag_widget; ?>>
				<?php wp_tag_cloud(); ?>
			</li>
<?php
		}

		// if this is the frontpage 
		if (is_home() || is_page()) {
			// put the blogroll
			get_links_list();
		}
		
		// our meta widget, defined in functions.php
		widget_mandigo_meta();
	}
?>
		</ul>
	</td>

keinen Ort wo ich diesen Link:

Code:
<li><h4 class="widgettitle">Titel</h4><DEIN BUTTON></li>

unterbringen könnte (zumindest sehe ich keinen, was nicht viel bedeuten mag). ;)
 

nevermind

Bismarckapfel
Registriert
19.12.07
Beiträge
142
ok. Du hast relativ recht ;).
Wenn die Buttons ganz oben stehen dürfen, kann der Code nach
Code:
<ul class="sidebars">
rein.

Ansonsten lese ich aus den Kommentaren, dass das in die functions.php muss.
Schwachsinn. Ansonsten wäre in Erfahrung zu bringen, wie das mit den widgets funktioniert.
 
Zuletzt bearbeitet:
  • Like
Reaktionen: ZENcom

ZENcom

Goldener Apfel der Eris
Registriert
30.03.06
Beiträge
2.600
yatib33x40.gif
Das hat doch tatsächlich geklappt!

Bis auf die beiden Sternchen für die Kategorien/Widgets ist die Mission accomplished.
dance24x21.gif
 

TaTonka

Neuer Berner Rosenapfel
Registriert
19.03.06
Beiträge
1.975
Ganz ehrlich, wenn du schon Widgets benutzt, dann nimm doch einfach das Text-Widget und bau da den HTML-Code so ein, wie du ihn auch in den Quelltext einbauen wolltest. Ist am einfachsten, und auch am vorgesehendsten.