User talk:Zedomax~mediawikiwiki

From mediawiki.org
Latest comment: 16 years ago by Rovo

Could you please tell me what to edit in bookmark.php so I can relocate the bookmark icon on my page? Thankyou--Rovo 21:20, 8 January 2008 (UTC)Reply

Hi there,[edit]

If you want to place it anywhere in your template, you can use the following instead:

<?php
# Bookmarking extension v.0.1 by Max Lee from http://zedomax.com/wiki

# To install it put this file in the extensions directory
# To activate the extension, include it from your LocalSettings.php
# with: require_once("extensions/bookmark.php");

# After installation, Bookmark buttons should appear at the bottom of every page.
$wgExtensionCredits['parserhook'][] = array(
'name' => 'Bookmark Extension - 12/02/2007',
'author' => 'Max Lee http://zedomax.net',
'url' => 'http://zedomax.com/wiki',
'version' => 'v.0.1',
'description' => 'Bookmark plugin for MediaWiki',
);

$wgHooks['bookmark'][] = array("wfBookmark");

function wfBookmark() {
    global $wgArticle,$wgTitle;
    if ($wgArticle == null) return $out;
    //if ($wgArticle->getTitle()->mNamespace != 0 || $wgTitle->getArticleId()<=1) return  $out;
    if ($wgArticle->getTitle()->mNamespace != 0) return  $out;


        $out ='<script type="text/javascript">';
        $out .='addthis_url    = location.href;';
        $out .='addthis_title  = document.title;';
        $out .='addthis_pub    = \'zedomax\';';
        $out .='</script>';
        $out .='<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>    ';

    $out .='<a href="javascript:window.location = \'http://www.socialmarker.com/?link=\'+encodeURIComponent (location.href)+\'&title=\'+encodeURIComponent( document.title);"><img src= "http://www.socialmarker.com/bookmark.gif" border="0" /></a>    ';

      echo $out;



    return true;

}

?>

Then add this code to your template file (monobook.php under skins directory):

<div id="bookmark"><?php wfRunHooks('bookmark'); ?></div>

You can add now use CSS to place it anywhere in your wiki.

I hope that helps! :)

If it did, check out my new wiki site, http://sitehoppin.com!

How do i center the AdSense adverts, or right-align them?[edit]

Hey,

How do i center the adverts or right-align them?

When i try <center> i get nothing, and when i try <div style="text-align:center;"></div> i get nothing.

It's only when i have neither of the above, i actually get the ads.

My URL is here: http://www.hobbsknowledgebase.co.uk/wiki/Template:Adsense_468x60

Somehow, when i use either <center> or <div...> it inserts a <p> tag just in here:

<script type="text/javascript"><!-- <p>google_ad_client

Thanks in advance! :-)

Right-aligning adsense adverts - is there any news on this?[edit]

hey dude - is there any news on how to right-align the adverts?

Thanks again :-)

Right-alignment or any other CSS[edit]

Since the code is marked as div id="bookmark" as shown here:

<div id="bookmark"><?php wfRunHooks('bookmark'); ?></div>

You can add this to your CSS file:

#bookmark {
 float:right;
}

or you can even do this:

<div id="bookmark" style="float:right;"><?php wfRunHooks('bookmark'); ?></div>

There are other ways to do it for example you can place it exactly in a location but I won't go into that unless you really need it.

Your account will be renamed[edit]

04:20, 18 March 2015 (UTC)

Renamed[edit]

08:10, 22 April 2015 (UTC)