با سلام خدمت همه دوستان
اگر محبت کنید و بفرمایید که چگونه میتونم دکمه گوگل پلاس رو به ویکی اضافه کنم ممنون می*شوم.
یاعلی مدد...

با سلام خدمت همه دوستان
اگر محبت کنید و بفرمایید که چگونه میتونم دکمه گوگل پلاس رو به ویکی اضافه کنم ممنون می*شوم.
یاعلی مدد...
جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.
سلام
[مهمان/کاربر گرامی برای دیدن لینک ها ابتدا باید عضو سایت شوید و لاگین کنید برای ثبت نام اینجا کلیک کنید]
یا علی
جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.
با سلام و تشکر از جناب
[مهمان/کاربر گرامی برای دیدن لینک ها ابتدا باید عضو سایت شوید و لاگین کنید برای ثبت نام اینجا کلیک کنید] عزیز
متاسفانه لینک فی ل تره!
ممنون
جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.
As per the [مهمان/کاربر گرامی برای دیدن لینک ها ابتدا باید عضو سایت شوید و لاگین کنید برای ثبت نام اینجا کلیک کنید] on the Webmasters site - I started exploring options to include it in the MediaWiki site. However, I could not find any ready steps - so I decided to share this with everyone.
1. <!-- Place this tag in your head or just before your close body tag -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
2. <!-- Place this tag where you want the 1 button to render -->
کد:<g:plusone></g:plusone>
Steps for MediaWiki installations:
(I am a newbie to Mediawiki and hence this might not be the *best way* to achieve this)
- Go to LocalSettings.php
- Add the following code
--- This ensures that the step (1) above happens correctly. and the plus one API is loaded and referenced from the HTML head.کد:$wgHooks['BeforePageDisplay'][] = 'MyExtensionJavaScript'; function MyExtensionJavaScript( $out ) { # ----------------------------------------------- # Merge JavaScript into OutputPage # ----------------------------------------------- $script = '<script type="text/javascript" language="javascript" src="https://apis.google.com/js/plusone.js">' . '</script>'; $out->addScript( $script); return true; }
2. Go the the .php file . In my case the site uses the Vector template and hence I edited the Vector.php
1. In Vector.php add the below code after
کد:کد:<!-- firstHeading --> <h1 id="firstHeading" class="firstHeading"><?php $this->html( 'title') ?> <g:plusone size="medium" href="/"></g:plusone> </h1> <!-- /firstHeading -->
And voila - You would have a +1 Button on [مهمان/کاربر گرامی برای دیدن لینک ها ابتدا باید عضو سایت شوید و لاگین کنید برای ثبت نام اینجا کلیک کنید].
Update: 14-July: Rendering of code update (as per comment by Tom. Thanks!)
جهت مشاهده لینک ها باید ثبت نام کنید یا لاگین کنید.
علاقه مندی ها (Bookmarks)