Alternative content

GoogleTagged

Mod Sahibi : karlbenson
Linki : http://custom.simplemachines.org/mods/index.php?mod=1245

Mod google’dan gelen ziyaretçileri hangi tag ile geldiğini o konu altında listeliyor.
toplu olarakta action=tagged rasgele şeklinde sıralıyor.
örneğin smf yazarak bu sitede herhangi bir konuya tıkladığınızda kendiliğinden hiçbir ayar yapmadan konunun alt kısmına tag olarak ekliyor. ayrıca istemediğiniz kelimeleride filtrelememizi sağlıyor. ayarlarını admin panelinden yapıyoruz. google tagged adlı bir menü ekliyor admin panelinde sol tarafa.

resimlerle anlatmaya çalışayayım:

[img]http://www.resim-yukle.net/upload/a2edb1_index.jpg[/img]

[img]http://img512.imageshack.us/img512/1840/indexwr1.jpg[/img]

ilk ek: modun kurulum paketi
ikincisi: türkçe eklentisi

ilk önce paketimizi kuruyoruz ardından ekte verdiğim turkish.php dosyasını kullandığımız temanın labguage klasörüne atıyoruz.

iyi çalışmalar..
[b]MANUELİ AŞAĞIDADIR[/b]
[hr]

farklı şekillerde tablolar için ;

[img]http://img503.imageshack.us/img503/9926/taggetus1.jpg[/img]

nasılsa sorulacak :D

bizim sitedeki gibi çerçeve içine almak isteyenler;

display template.php de bulsun (kullandığınız temanın içindekinde yoksa defaulta bakın)

// START OF GOOGLE TAGGED MOD
	if(isset($context['tags'])) {
		// START OUR DIV CONTAINER
		echo '
'.$txt['googletagged'].':'; $i = 1 ; // WRITE OUT OUR TAGS foreach($context['tags'] as $key => $row) { echo ' ', $row['text'] ,''; // INCREASE COUNTER UNTIL WE MAY NEED TO BREAK // IF DIVISABLE BY 10 - NEW LINE echo (($i % 10) == 0) ? '' : ''; $i++; } // TIDY UP unset($i,$key,$row); // CLOSE OUT OUR DIV echo '
'; } // END OF GOOGLE TAGGED MOD

değiştirsin

// START OF GOOGLE TAGGED MOD
	if(isset($context['tags'])) {
		// START OUR DIV CONTAINER
		echo '
'.$txt['googletagged'].'
'; $i = 1 ; // WRITE OUT OUR TAGS foreach($context['tags'] as $key => $row) { echo ' ', $row['text'] ,''; // INCREASE COUNTER UNTIL WE MAY NEED TO BREAK // IF DIVISABLE BY 10 - NEW LINE echo (($i % 10) == 0) ? '' : ''; $i++; } // TIDY UP unset($i,$key,$row); // CLOSE OUT OUR DIV echo '
'; } // END OF GOOGLE TAGGED MOD

[hr]

buda benim kulllandığım ;

o zaman buyrun bende vereyim bende şu şekilde kullanıyorum ::)

[img]http://img361.imageshack.us/img361/9130/89924395bo2.jpg[/img]

// START OF GOOGLE TAGGED MOD
	if(isset($context['tags'])) {
		// START OUR DIV CONTAINER
			echo'
||| GoogleTagged |||
'.$txt['googletagged'].':'; $i = 1 ; // WRITE OUT OUR TAGS foreach($context['tags'] as $key => $row) { echo ' ', $row['text'] ,''; // INCREASE COUNTER UNTIL WE MAY NEED TO BREAK // IF DIVISABLE BY 10 - NEW LINE echo (($i % 10) == 0) ? '' : ''; $i++; } // TIDY UP unset($i,$key,$row); // CLOSE OUT OUR DIV echo '
'; } // END OF GOOGLE TAGGED MOD

[hr][hr]
[b]Manuel Anlatımını [/b] veriyorum (herseysizinicin.com)

$languagedir/Modifications.turkish.php dosyasında
Bul:

?>

Öncesine ekle:

$txt['googletagged'] = 'GoogleTagged';
	$txt['googletagged_admin'] = 'GoogleTagged';
	$txt['googletagged_menu'] = 'GoogleTagged';
	$txt['googletagged_manage'] = 'Manage GoogleTagged';

[color=red][b]EDİT:GorselSanatlar.org.Modu uyguladıktan sonra üye izinerinde boş bir kısım çıkıyor diyenler bu kodlamayı yapsınlar. [/b] [/color]
$languagedir/Modifications.turkish.php dosyasında
Bul:

?>

Öncesine ekle:

$txt['permissionname_googletagged_manage'] = 'Manage GoogleTagged';
$txt['permissiongroup_googletagged'] = 'GoogleTagged';

$themedir/style.css dosyasında
Dosyanın sonuna ekle:

a.googletag
	{
	color: #003399;
	}

a.googletagged
	{
	color: #336699;
	}

$themedir/Display.template.php dosyasında
Bul:

if ($context['show_spellchecking'])
		echo '
';

Öncesine ekle:

// START OF GOOGLE TAGGED MOD
	if(isset($context['tags'])) {
		// START OUR DIV CONTAINER
		echo '
'.$txt['googletagged'].':'; $i = 1 ; // WRITE OUT OUR TAGS foreach($context['tags'] as $key => $row) { echo ' ', $row['text'] ,''; // INCREASE COUNTER UNTIL WE MAY NEED TO BREAK // IF DIVISABLE BY 10 - NEW LINE echo (($i % 10) == 0) ? '' : ''; $i++; } // TIDY UP unset($i,$key,$row); // CLOSE OUT OUR DIV echo '
'; } // END OF GOOGLE TAGGED MOD

$themedir/index.template.php dosyasında
Bul:

// the [member] list button
	if ($context['allow_memberlist'])
		echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '
 

' : '' , '

					' , $txt[331] , '
				

' , $current_action == 'mlist' ? '
 

' : '';

Sonrasına ekle:

// The [GoogleTagged] Button
		echo ($current_action == 'tagged' || $context['browser']['is_ie4']) ? '
 

' : '' , '

					' , $txt['googletagged']  , '
				

' , $current_action == 'tagged' ? '
 

' : '';

Bul:

$current_action = 'admin';
	if (in_array($context['current_action'], array(

Sonrasına ekle:

'tagged',

$boarddir/index.php dosyasında
Bul:

'help' => array('Help.php', 'ShowHelp'),

Sonrasına ekle:

'tagged' => array('GoogleTagged.php', 'GoogleTagged'),

$sourcedir/ManagePermissions.php dosyasında
Bul:

'pm' => array(
				'pm_read' => false,
				'pm_send' => false,
			),

Sonrasına ekle:

'googletagged' => array(
				'googletagged_manage' => false,
			),

$sourcedir/Subs.php dosyasında
Bul:

'edit_settings' => '' . $txt[222] . '',

Sonrasına ekle:

'googletagged_settings' => '' . $txt['googletagged_menu'] . '',

$sourcedir/Display.php dosyasında
Bul:

// Add 1 to the number of views of this topic.
	if (empty($_SESSION['last_read_topic']) || $_SESSION['last_read_topic'] != $topic)

Öncesine ekle:

// START OF GOOGLE TAGGED MOD
	if($modSettings['googletagged'] == 1) {
		googletagged();
	}
	// END OF GOOGLE TAGGED MOD

Bul:

// The central part of the board - topic display.
function Display()

Öncesine ekle:

// START OF GOOGLE TAGGED MOD
function googletagged(){

	global $db_prefix, $context, $modSettings, $topic;

	$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '';
	// IF WANTING TO TEST WITH VARIOUS SERIOUS URLS, UNCOMMENT THE NEXT LINE
	// $referer = "http://www.google.com/search?hl=en&q=harry+potter&meta=";

	if(!empty($referer)) {
		// DETECT CERTAIN SEARCH ENGINES
		if(preg_match('/www\.google.*/i',$referer)
			|| preg_match('/search\.msn.*/i',$referer)
			|| preg_match('/search\.yahoo.*/i',$referer)
			|| preg_match('/search\.lycos\.com/i', $referer)
			|| preg_match('/www\.alltheweb\.com/i', $referer)
			|| preg_match('/search\.aol\.com/i', $referer)
			|| preg_match('/www\.ask\.*/i', $referer)) {

			// DETECTED A SEARCH ENGINE REFERRED - NOW GET THE SEARCH TERM DELIMITER
			//Figure out which search and get the part of its URL which contains the search terms.
			if(preg_match('/(www\.google.*)|(search\.msn.*)|(www\.alltheweb\.com)|(ask\.*)/i',$referer))
				$delimiter = "q";
			elseif(preg_match('/(search\.lycos\.com)|(search\.aol\.com)/i', $referer))
				$delimiter = "query";
			elseif(preg_match('/search\.yahoo.*/i',$referer))
				$delimiter = "p";

			// NOW USE THE DELIMITER
			$pattern = "/^.*" . $delimiter . "=([^&]+)&?.*\$/i";
			$query = preg_replace($pattern, '$1', $referer);
			// TIDY UP
			unset($pattern,$delimiter);

			// REMOVE OUR QUOTES
			$query = preg_replace('/\'|"/','',$query);

			// COMMON IGNORE/BAD WORDS/UNWANTED BITS
			$ignorewords = array(
					'a', 'am', 'an', 'and', 'are', 'be', 'been', 'because', 'by',
					'for', 'from', 'he', 'her', 'his', 'i', 'in', 'is', 'isnt', 'its', 'it',
					'of', 'on', 'or', 'over', 'off', 'that', 'the', 'there', 'their', 'this', 'was', 'with',
					'fuck', 'dick', 'wanker', 'bastard', 'fucking', 'whore', 'cunt', 'bitch', 'fucker',
					'http://www', 'www', 'www.', 'http://', 'com', 'co.uk', 'v1agra', 'viagra',
					'

son olarakta ekte verdiğim dosyalar.zip dosyasını açıyorsunuz ve içindeki dosyaları yerlerine atıyorsunuz. kolay gelsin.

GoogleTagged.php dosyası sources hedefine kopyalanacaktır
GoogleTagged.template.php dosyası tema klasörüne kopyalanacaktır
GoogleTagged.english.php dosyası temanız/languages hedefine kopyalanacaktır
GoogleTagged.english-utf8.php dosyası temanız/languages hedefine kopyalanacaktır
GoogleTagged.turkish.php dosyası temanız/languages hedefine kopyalanacaktır

Yürütülecek PHP scripti: install.php yi bir kez çalıştırın.

Benzer Konular:

  1. Google Tagged 2.0 RC2
  2. Google Tagged v2.0

Etiketler: , , , , , , ,

Yorum yapın

Yorum yapabilmek için giriş yapmalısınız.