Skocz do zawartości
"Idzie nowe..." - o zmianach i nie tylko ×
Przeniesienie zakupów z IPS Marketplace / Moving bought items from IPS Marketplace ×

Google Bot - Wygląd


kris2005a

Rekomendowane odpowiedzi

Witam...

Zainstalowałem Google Boota na sowje forum i coś mi w nim nie gra. A mianowicie wygląd owego bota. Gdzie można go zmienić by był funkcjonalny i ładny? Chodzi mi o kolor nazwy "Google Bot", (logo wiem gdzie można zmienić) i jeszcze jak można mu wspisać dodatkowe informacje w miejsce liczby postów, miejsca zamieszkania etc.

Pz. Kris2005a

post-209-1224695796_thumb.jpg

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

Nazwy możesz zmienić w ACP w TOOLS & SETTINGS -> Adsense Bot Settings.

A odnośnie dodatkowych informacji, to musisz je zakodować tutaj: sources/lib/func_topic_linear.php, dokładnie ten fragment:

$bot_poster = array (
						'_members_display_name' => $this->ipsclass->vars['adsense_name'],
						'avatar'  => '<img src="style_images/adsense.gif">',
						'title'   => $this->ipsclass->vars['adsense_title'],
						);

Jak będziesz miał problem to napisz, postaram się znaleźć co wpisać by dodać inne informacje - tylko napisz jakie :(

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

Nie masz wpisanego adresu forum w profilu to nie mogę tego na żywo zobaczyć. Wpisz proszę ten link :(

No z nazwą to nie takie proste, ale może spróbuj tak:

 '_members_display_name' => "<font color='red'>".$this->ipsclass->vars['adsense_name']."</font>",

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

No to fajnie, ale napisz czy tak, jak ja pisałem czy inaczej ( jak ) ?

Ogólnie to masz jeszcze jakieś pytania odnośnie tego moda czy już wszystko jest jasne ? :(

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

To dziwne bo wedle tego powinnieneś go widzieć, jest wszystko dobrze ustawione :(

//////

Już go zobaczysz.... Poprawiłem :(

np: http://www.gcpl.pl/index.php?showtopic=1147

****

I jeszcze jedno jak ustawić by Boot wyświetlał swój post pod pierwszym postem w temacie?

Edytowane przez kris2005a
Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

Co racja to racja, nie zauważyłem, że masz to na dole, zwykle ludzie umieszczają to po pierwszym poście.

A te kreski to wiadome - one oddzielają informacje o użytkowniku, ale, że to nie użytkownik, a bot to takich informacji nie posiada i przez to robią się te kreski..

Lub też jest tego inny powód. Jaki? To już wymagałoby ingerencji by to sprawdzić. Dasz radę :(

I jeszcze jedno jak ustawić by Boot wyświetlał swój post pod pierwszym postem w temacie?

Może wreszcie zajrzysz do ustawień tej modyfikacji zamiast się pytać o coś, co jest w ustawieniach ?

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

To spróbuj tak, znajdź w kodzie:

						else
					{
						$adpost = $this->ipsclass->vars['adsense_post'];
					}

Dodaj poniżej:

$adpost = 1;

Zapisz i wyślij i sprawdź.

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

Ah właśnie - w dobrym miejscu umieściłeś kod tego moda? Kiedyś rybenia zrobił podobny błąd - umieścił kod poniżej, a powinien POWYŻEJ i musiałem mu to poprawiać :(

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

CODE-BOX
<?php

/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| © 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2007-05-02 17:29:35 -0400 (Wed, 02 May 2007) $
| > $Revision: 959 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Topic display module
| > Module written by Matt Mecham
| > Date started: 18th February 2002
|
| > Module Version Number: 1.1.0
| > DBA Checked: Fri 21 May 2004
+--------------------------------------------------------------------------
*/


if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
exit();
}

class topic_display
{
# Global
var $ipsclass;

var $output = "";
var $base_url = "";
var $html = "";
var $moderator = array();
var $forum = array();
var $topic = array();
var $mod_action = array();
var $poll_html = "";
var $mimetypes = "";
var $nav_extra = "";
var $read_array = array();
var $mod_panel_html = "";
var $warn_range = 0;
var $warn_done = 0;
var $pfields = array();
var $pfields_dd = array();
var $md5_check = "";
var $post_count = 0;
var $cached_members = array();
var $first_printed = 0;
var $pids = array();

/*-------------------------------------------------------------------------*/
// Register class
/*-------------------------------------------------------------------------*/

function register_class(&$class)
{
$this->lib = &$class;

$this->topic = $this->lib->topic;
$this->forum = $this->lib->forum;
}

/*-------------------------------------------------------------------------*/
//
// Our constructor, load words, load skin, print the topic listing
//
/*-------------------------------------------------------------------------*/

function auto_run()
{
require_once( ROOT_PATH.'sources/action_public/topics.php' );

$this->lib = new topics();
$this->lib->ipsclass =& $this->ipsclass;

$this->lib->init();
$this->lib->topic_set_up();

$this->topic = &$this->lib->topic;
$this->forum = &$this->lib->forum;

//-----------------------------------------
// Checky checky
//-----------------------------------------

if ( ! $this->topic['topic_firstpost'] )
{
$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic=".$this->topic['tid'].'&mode=standard');
}

//-----------------------------------------
// Print it
//-----------------------------------------

$this->output = str_replace( "<!--IBF.MOD_PANEL-->", $this->lib->moderation_panel(), $this->output );

// Enable quick reply box?

if ( ( $this->topic['quick_reply'] == 1 )
and ( $this->ipsclass->check_perms( $this->topic['reply_perms']) == TRUE )
and ( $this->topic['state'] != 'closed' ) )
{
$show = "none";

$sqr = $this->ipsclass->my_getcookie("open_qr");

if ( $sqr == 1 )
{
$show = "show";
}
$this->output = str_replace( "<!--IBF.QUICK_REPLY_CLOSED-->", $this->ipsclass->compiled_templates['skin_topic']->quick_reply_box_closed(), $this->output );
$this->output = str_replace( "<!--IBF.QUICK_REPLY_OPEN-->" , $this->ipsclass->compiled_templates['skin_topic']->quick_reply_box_open($this->topic['forum_id'], $this->topic['tid'], $show, $this->md5_check), $this->output );
}

$this->output = str_replace( "<!--IBF.TOPIC_OPTIONS_CLOSED-->", $this->ipsclass->compiled_templates['skin_topic']->topic_opts_closed(), $this->output );
$this->output = str_replace( "<!--IBF.TOPIC_OPTIONS_OPEN-->" , $this->ipsclass->compiled_templates['skin_topic']->topic_opts_open($this->topic['forum_id'], $this->topic['tid']), $this->output );

$this->topic['id'] = $this->topic['forum_id'];

$this->output = str_replace( "<!--IBF.FORUM_RULES-->", $this->ipsclass->print_forum_rules($this->topic), $this->output );

//-----------------------------------------
// Topic multi-moderation - yay!
//-----------------------------------------

$this->output = str_replace( "<!--IBF.MULTIMOD-->", $this->lib->multi_moderation(), $this->output );

// Pass it to our print routine

$this->ipsclass->print->add_output("$this->output");
$this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name']." -> {$this->topic['title']}",
'JS' => 1,
'NAV' => $this->lib->nav,
) );
}

/*-------------------------------------------------------------------------*/
//
// Show the damned topic batman
//
/*-------------------------------------------------------------------------*/

function display_topic()
{
//-----------------------------------------
// Grab the posts we'll need
//-----------------------------------------

$first = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;

$query_type = 'topics_get_posts';

if ( $this->ipsclass->vars['post_order_column'] != 'post_date' )
{
$this->ipsclass->vars['post_order_column'] = 'pid';
}

if ( $this->ipsclass->vars['post_order_sort'] != 'desc' )
{
$this->ipsclass->vars['post_order_sort'] = 'asc';
}

if ($this->ipsclass->vars['au_cutoff'] == "")
{
$this->ipsclass->vars['au_cutoff'] = 15;
}

if ( $this->ipsclass->vars['custom_profile_topic'] == 1 )
{
$query_type = 'topics_get_posts_with_join';
}

//-----------------------------------------
// Moderator?
//-----------------------------------------

$queued_query_bit = ' and queued=0';

if ( $this->ipsclass->can_queue_posts($this->topic['forum_id']) )
{
$queued_query_bit = '';

if ( isset($this->ipsclass->input['modfilter']) AND $this->ipsclass->input['modfilter'] == 'invisible_posts' )
{
$queued_query_bit = ' and queued=1';
}
}

//-----------------------------------------
// Using "new" mode?
//-----------------------------------------

if ( $this->lib->topic_view_mode == 'linearplus' and $this->topic['topic_firstpost'] )
{
$this->topic['new_mode_start'] = $first + 1;

if ( $first )
{
$this->topic['new_mode_start']--;
}

if ( $first + $this->ipsclass->vars['display_max_posts'] > ( $this->topic['posts'] + 1 ) )
{
$this->topic['new_mode_end'] = $this->topic['posts'];
}
else
{
$this->topic['new_mode_end'] = $first + ($this->ipsclass->vars['display_max_posts'] - 1);
}

if ( $first )
{
$this->pids = array( 0 => $this->topic['topic_firstpost'] );
}

//-----------------------------------------
// Get PIDS of this page/topic
//-----------------------------------------

$this->ipsclass->DB->simple_construct( array (
'select' => 'pid,topic_id',
'from' => 'posts',
'where' => 'topic_id='.$this->topic['tid']. $queued_query_bit,
'order' => 'pid',
'limit' => array( $first, $this->ipsclass->vars['display_max_posts'] )
) );

$this->ipsclass->DB->simple_exec();

while( $p = $this->ipsclass->DB->fetch_row() )
{
$this->pids[] = $p['pid'];
}
}
else
{
//-----------------------------------------
// Run query
//-----------------------------------------

$this->lib->topic_view_mode = 'linear';

# We don't need * but if we don't use it, it won't use the correct index
$this->ipsclass->DB->simple_construct( array (
'select' => 'pid,topic_id',
'from' => 'posts',
'where' => 'topic_id='.$this->topic['tid']. $queued_query_bit,
'order' => $this->ipsclass->vars['post_order_column'].' '.$this->ipsclass->vars['post_order_sort'],
'limit' => array( $first, $this->ipsclass->vars['display_max_posts'] )
) );

$this->ipsclass->DB->simple_exec();

while( $p = $this->ipsclass->DB->fetch_row() )
{
$this->pids[] = $p['pid'];
}
}

//-----------------------------------------
// Do we have any PIDS?
//-----------------------------------------

if ( ! count( $this->pids ) )
{
if ( $first )
{
//-----------------------------------------
// Add dummy PID, AUTO FIX
// will catch this below...
//-----------------------------------------

$this->pids[] = 0;
}

if ( $this->ipsclass->input['modfilter'] == 'invisible_posts' )
{
$this->pids[] = 0;
}
}

//-----------------------------------------
// Attachment PIDS
//-----------------------------------------

$this->lib->attach_pids = $this->pids;

//-----------------------------------------
// Fail safe
//-----------------------------------------

if ( ! is_array( $this->pids ) or ! count( $this->pids ) )
{
$this->pids = array( 0 => 0 );
}

//-----------------------------------------
// Get posts
//-----------------------------------------

$this->ipsclass->DB->cache_add_query( $query_type, array( 'pids' => $this->pids, 'scol' => $this->ipsclass->vars['post_order_column'], 'sord' => $this->ipsclass->vars['post_order_sort'] ) );

$oq = $this->ipsclass->DB->simple_exec();

if ( ! $this->ipsclass->DB->get_num_rows() )
{
if ($first >= $this->ipsclass->vars['display_max_posts'])
{
//-----------------------------------------
// AUTO FIX: Get the correct number of replies...
//-----------------------------------------

$this->ipsclass->DB->simple_construct( array(
'select' => 'COUNT(*) as pcount',
'from' => 'posts',
'where' => "topic_id=".$this->topic['tid']." and queued !=1"
) );

$newq = $this->ipsclass->DB->simple_exec();

$pcount = $this->ipsclass->DB->fetch_row($newq);

$pcount['pcount'] = $pcount['pcount'] > 0 ? $pcount['pcount'] - 1 : 0;

//-----------------------------------------
// Update the post table...
//-----------------------------------------

if ($pcount['pcount'] > 1)
{
$this->ipsclass->DB->simple_construct( array(
'update' => 'topics',
'set' => "posts=".$pcount['pcount'],
'where' => "tid=".$this->topic['tid']
) );

$this->ipsclass->DB->simple_exec();

}

$this->ipsclass->boink_it($this->ipsclass->base_url."showtopic={$this->topic['tid']}&view=getlastpost");
}
}

//-----------------------------------------
// Render the page top
//-----------------------------------------

$this->topic['go_new'] = isset($this->topic['go_new']) ? $this->topic['go_new'] : '';

if ( $this->lib->topic_view_mode == 'linearplus' and $this->topic['posts'] > 0 )
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 1 );
}
else
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_page_top( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 0 );
}

//-----------------------------------------
// Format and print out the topic list
//-----------------------------------------

while ( $row = $this->ipsclass->DB->fetch_row( $oq ) )
{
$return = $this->lib->parse_row( $row );

$poster = $return['poster'];
$row = $return['row'];

//-----------------------------------------
// Print post row
//-----------------------------------------
if (!$this->ipsclass->member['id'])
{
$postlink = $row['post'];
$post_info = preg_split('/(<!--ec1-->.*?<!--c2-->)/', $postlink, 65535, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
for ($moo=0; $moo<=count($post_info); $moo++) {
if(strstr($post_info[$moo],'<!--ec1-->'))
$postlink=str_replace($post_info[$moo],
"<div class='errorwrap'>Tę tre¶ć widoczna jest tylko przez zarejestrowanych użytkowników. Aby zobaczyć tę tre¶ć musisz się <a href='index.php?act=Login&CODE=00'>zalogować</a>. Nie masz konta na Gcpl.pl? <a href='index.php?act=Reg&CODE=00'>Zarejestruj</a> się już teraz!</div>", $postlink);
}
$row['post'] = $postlink;
}

$this->output .= $this->ipsclass->compiled_templates['skin_topic']->RenderRow( $row, $poster );

//-----------------------------------------
// Are we giving this bloke a good ignoring?
//-----------------------------------------

if ( $this->ipsclass->member['ignored_users'] )
{
if ( strstr( $this->ipsclass->member['ignored_users'], ','.$poster['id'].',' ) and $this->ipsclass->input['p'] != $row['pid'] )
{
if ( ! strstr( $this->ipsclass->vars['cannot_ignore_groups'], ','.$poster['mgroup'].',' ) )
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->render_row_hidden( $row, $poster );
continue;
}
}
}

//-----------------------------------------
// Show end first post
//-----------------------------------------

if ( $this->lib->topic_view_mode == 'linearplus' and $this->first_printed == 0 and $row['pid'] == $this->topic['topic_firstpost'] and $this->topic['posts'] > 0)
{
$this->output .= $this->ipsclass->compiled_templates['skin_topic']->topic_end_first_post( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ) );
}
}

//--------------------
// Google Adsense Bot
//--------------------
if ($this->ipsclass->vars['adsense_online'] == 1)
{
if ( in_array( $this->ipsclass->member['mgroup'], explode( ",", $this->ipsclass->vars['adsense_group'] ) ) )
{
if ( in_array( $this->topic['forum_id'], explode( ",", $this->ipsclass->vars['adsense_forum'] ) ) )
{
$this->post_count++;
// Set up Page Stuff
$postcount = $this->topic['posts'] + 1;
$partial = $this->ipsclass->input['st'];
if( $partial != '0' )
{
$partial = $partial + 1;
}
$count = $postcount - $partial;
if ($this->ipsclass->vars['adsense_post'] <= 0)
{
$adpost = '1';
}
else
{
$adpost = $this->ipsclass->vars['adsense_post'];
}
$adpost = '1';
if ($count <= $adpost)
{
$pie = $count + 1;
}
else
{
$pie = $adpost;
}
if ($this->post_count == $pie )
{
$ad = array ( 'name_css' => 'normalname',
'post_css' => ($post_count % 2 ? 'post1' : 'post2'),
'pid' => '0',
'post' => $this->ipsclass->vars['adsense_ad']);
$bot_poster = array (
'_members_display_name' => " <img src='http://gcpl.pl/style_images/darkbluepr/folder_profile_portal/user-online.png' alt='' border='0'><font color='A9A9A9'>".$this->ipsclass->vars['adsense_name']."</font>",
'avatar' => '<img src="style_images/adsense.gif">',
'title' => $this->ipsclass->vars['adsense_title'],
);


$this->output .= $this->ipsclass->compiled_templates['skin_topic']->RenderRow( $ad, $bot_poster );
}
}
}
}
//-----------------------------------------
// Print the footer
//-----------------------------------------

$this->output .= $this->ipsclass->compiled_templates['skin_topic']->TableFooter( array( 'TOPIC' => $this->topic, 'FORUM' => $this->forum ), 0, $this->ipsclass->return_md5_check() );
}

}

?>


Ja mam takie coś :(
Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

Dlaczego nie zrobiłeś tak, jak pisałem tutaj http://forum.invisionize.pl/index.php?s=&a...post&p=6318 tylko jakoś inaczej ?

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

  • Manager

Skoro DawPi mówi, że coś jest nie tak to znaczy, że tak jest! :(

Poprawione.

Na przyszłość staraj się edytować pliki zgodnie z instrukcją, a potem jak masz błędy to sprawdzać to dokładnie, bo polecenie znalezienia kodu:

		}

	//-----------------------------------------
	// Print the footer
	//-----------------------------------------

I wstawienia czegoś PONAD nim nie oznacza wstawienia czegoś pomiędzy

}

a

		//-----------------------------------------
	// Print the footer
	//-----------------------------------------

:(

intermedia - profesjonalne rozwiązania Invision Power Board

---

Chcesz uzyskać szybko i sprawnie pomoc? Uzupełnij wersję i adres w profilu.

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę.