PDA

View Full Version : کد گوگل پلاس برای اسمارتی



hassan68
دوشنبه 14 شهریور 1390, 23:17 عصر
دوستان کدی برای گوگل پلاس ندارید که تو سایتایی که اسمارتی هستن درست نشون بده



<?php
ini_set('display_errors','0');
error_reporting(0);

# uniq_sozial 0.1 googleplus plugin for smarty
# from http://www.uniq-arts.de
# 2011 uniq-arts

# parameter
# {googleplus now=online size=small lang=de count=true}

# uniqarts setup
# update || default true, you check of updates for this plugin

function smarty_function_googleplus($params, &$smarty) {



if($params[now]=="enable") {

if ($params[size]) {$size = $params[size]; } else { $size = "standard";}
if ($params[lang]) {$lang = $params[lang]; } else { $lang = "en-GB";}
if ($params[href]) {$href = $params[href]; } else { $href = "";}
if ($params[count]) {$count = $params[count]; } else { $count = "";}
if ($params[callback]) {$callback = $params[callback]; } else { $callback = "";}
if ($params[css]) {$css = $params[css]; } else { $css = "uniq_googleplus";}

}

echo '<script type="text/javascript" src="https://apis.google.com/js/plusone.js">{lang: \'' . $lang . '\'}{"parsetags": "explicit"}</script>';


if($params[now] == 'enable') {
return '<div class="'.$css.'" style="float:'.$floating.'"><g:plusone count="'.$count.'" href="'.$href.'" size="'.$size.'"></g:plusone></div>';
}

}


?>


از کد بالا تو قسمت پلاگین سایت و از کد زیر توی فایل tpl قالب استفاده کردم ولی دکمه نشون نمیده
{googleplus now=enable size=small lang=de count=true}
لطفا کمک کنید مشکل کجاست

hassan68
سه شنبه 15 شهریور 1390, 11:58 صبح
نه دوست عزیز این به درد اسمارتی نمیخوره
اسمارتی یه کم طریقه نوشتن کداش فرق میکنه که دوستانی که وارد هستن لطف کنن کمک کنن

armsoftpc
سه شنبه 15 شهریور 1390, 21:21 عصر
به نام خدا
با سلام
دوستان می تونند لطف کنند بگند اسمارتی چی هست؟

hassan68
سه شنبه 15 شهریور 1390, 23:20 عصر
دوستان کسی نبود جواب بده

famarini
جمعه 18 شهریور 1390, 23:56 عصر
امیدوارم کارتو راه بندازه


Smarty Google+ Plugin (English)

The Google+ plugin for the Smarty Template Engine enables you to easily and completely customizable implement the +1 Button within your Smarty based website.
Just download the Google+ plugin file (smarty_googleplus_plugin.zip) (http://www.uniq-arts.de/download.php?downl=5), unpack it and place the resulting ‘function.googleplus.php’ in your plugin directory.
Now, you can use it within your template file in this way:
{googleplus now=enable parameter=value}
It supports the following parameters:
size small, medium, standard, tall defines the size of the button lang (country code in the list below) defines the language count true, false defines whether clicks count is displayed or not css classname default class is ‘uniq_googleplus’ href URL defines the page to count; if nothing set, it defaults to the page where the button is placed List of country codes:
Arabian ar
Bulgarian bg
Catalan ca
Chinese (simplified) zh-CN
Chinesisch (traditional) zh-TW
Kroatian hr
Czech cs
Danish da
Netherlands nl
English (UK) en-GB
English (USA) en-US
Estnian et
Filipino fil
Finnish fi
French fr
German de
Greek el
Hebrew iw
Hindi hi
Ungarian hu
Indonesian id
Italian it
Japanese ja
Korean ko
Latvian lv
Lithuanian lt
Malay ms
Norwegian no
Persisch fa
Polish pl
Portuguese (Brazilian) pt-BR
Portuguese (Portugal) pt-PT
Romanian ro
Russian ru
Serbian sr
Slovakian sk
Slowenian sl
Spanish es
Spanisch (Lateinamerika) es-419
Swedish sv
Thai th
Turkish tr
Ukrainian uk
Vietnamese vi

hassan68
جمعه 25 شهریور 1390, 18:11 عصر
مرسی دوست عزیز ولی اینایی که شما گذاشتید همون کدایی هستند که من تو پست اول گذاشتم و لی جواب نمیده نمیدونم چرا؟؟؟؟؟