Cytowanie Selektywne - Zmiana obrazka

Założony przez  matajas1.

wersja skryptu MyBB:1.6.8
adres forum: http://games-zone.pl
na czym polega problem (screen, opis, komunikaty, nazwa stylu/theme/szablonu):

Zainstalowalem na forum plugin "Cytowanie Selektywne" jak wiadomo standardowy obrazek to :
[Obrazek: postbit_quote_fast.gif]

A ja chciałbym zmienic na swoj obrazek

[Obrazek: 86585601056029298413.jpg]

Lecz to nei chodzi o zwykle wgranie obrazka gdyż moje buttony dzialaja na jQuery. Po najechaniu zmienia jasnosc obrazka.
Twoje buttony opierają się na CSSie, nie obrazkach.

<span class="button_maly imgOpa" id="Image1" style="opacity: 0.5; ">
<
a href="private.php?action=send&uid=2">Prywatna wiadomość</a>
</
span
Czyli jak połączyć jedno z drugim?

Oto szablon
postbit_multiquote


<span class="button_maly imgOpa"  id="Image1"><a href="javascript:Thread.multiQuote({$post['pid']});" style="display: none;" id="multiquote_link_{$post['pid']}">Cytuj+</a></span>
<script type="text/javascript">
//<!--
    $('multiquote_link_{$post['pid']}').style.display = '';
// -->
</script>
Pokaż zawartość szablonu tego plugina, jeśli nie umiesz go znaleźć, podaj link do pobierania.
https://webboard.pl/thread-21782.html
public function addButton(&$post)
    {
        global 
$lang$mybb;

        
$post['button_quote_fast'] = '';

        if (!
$this->quick_reply_status)
        {
            return;
        }
        else if (
$mybb->settings['fastQuoteFullQuote'])
        {
            
$post['button_quote_fast'] .= '<a href="#message" onclick="addquote(\'fq' $post['pid'] . "','" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= '<img src="' $mybb->settings['fastQuoteImagePath'] . '" alt="' $mybb->settings['fastQuoteText'] . '" /></a>';
            
$post['button_quote_fast'] .= '<div style="display:none;" id="message_fq' $post['pid'] . '">' $this->posts[$post['pid']] . '</div>';
        }
        else
        {
            
$post['button_quote_fast'] .= '<a href="#message" onclick="addquote(' $post['pid'] . ",'" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= '<img src="' $mybb->settings['fastQuoteImagePath'] . '" alt="' $mybb->settings['fastQuoteText'] . '" /></a>';
        }
    } 


I chcesz podmienić to na styl reszty przycisków, ta?
Własnie tak
Możesz włączyć ten plugin aby pokazała się ta niebieska ikona?
Gotowe.
public function addButton(&$post)
    {
        global 
$lang$mybb;

        
$post['button_quote_fast'] = '';

        if (!
$this->quick_reply_status)
        {
            return;
        }
        else if (
$mybb->settings['fastQuoteFullQuote'])
        {
            
$post['button_quote_fast'] .= '<span class="button_maly imgOpa" id="Image1"><a href="#message" onclick="addquote(\'fq' $post['pid'] . "','" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= 'Cytowanie selektywne</a></span>';
            
$post['button_quote_fast'] .= '<div style="display:none;" id="message_fq' $post['pid'] . '">' $this->posts[$post['pid']] . '</div>';
        }
        else
        {
            
$post['button_quote_fast'] .= '<span class="button_maly imgOpa" id="Image1"><a href="#message" onclick="addquote(' $post['pid'] . ",'" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= 'Cytowanie selektywne</a></span>';
        }
    } 

Podmień funkcje.
Forum nie działa.

Blad

Parse error: syntax error, unexpected ';', expecting T_FUNCTION in /home/p210013/public_html/inc/plugins/fastQuote.php on line 190
public function addButton(&$post)
    {
        global 
$lang$mybb;

        
$post['button_quote_fast'] = '';

        if (!
$this->quick_reply_status)
        {
            return;
        }
        else if (
$mybb->settings['fastQuoteFullQuote'])
        {
            
$post['button_quote_fast'] .= '<span class="button_maly imgOpa" id="Image1"><a href="#message" onclick="addquote(\'fq' $post['pid'] . "','" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= 'Cytowanie selektywne</span></a>';
            
$post['button_quote_fast'] .= '<div style="display:none;" id="message_fq' $post['pid'] . '">' $this->posts[$post['pid']] . '</div>';
        }
        else
        {
            
$post['button_quote_fast'] .= '<span class="button_maly imgOpa" id="Image1"><a href="#message" onclick="addquote(' $post['pid'] . ",'" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= 'Cytowanie selektywne</span></a>';
        }
    } 

Spróbuj. Jak nie działa to będziesz musiał poczekać aż się dorwę do stacjonarki. Bo to mi się wydaje strasznie pomieszane. :P
Nada to samo
No bo coś źle wkejasz. :o

fastQuote.php

<?php
/**
 *
 * @author Lukasz "LukasAMD" Tkacz
 *
 * @package Fast Quote
 * @version 1.3
 * @copyright (c) 2012 Lukasz Tkacz
 * @license http://creativecommons.org/licenses/by-nc-sa/3.0/
 *
 */ 

/**
 * Disallow direct access to this file for security reasons
 * 
 */
if (!defined('IN_MYBB'))
{
    die(
'Direct initialization of this file is not allowed.');
}

/**
 * Create plugin object
 * 
 */
$plugins->objects['fastQuote'] = new fastQuote();

/**
 * Standard MyBB info function
 * 
 */
function fastQuote_info()
{
    global 
$lang;

    
$lang->load('fastQuote');

    
$lang->fastQuoteDesc '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" style="float:right;">' .
        
'<input type="hidden" name="cmd" value="_s-xclick">' 
        
'<input type="hidden" name="hosted_button_id" value="3BTVZBUG6TMFQ">' .
        
'<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">' .
        
'<img alt="" border="0" src="https://www.paypalobjects.com/pl_PL/i/scr/pixel.gif" width="1" height="1">' .
        
'</form>' $lang->fastQuoteDesc;

    return Array(
        
'name' => $lang->fastQuoteName,
        
'description' => $lang->fastQuoteDesc,
        
'website' => 'http://tkacz.pro',
        
'author' => 'Lukasz "LukasAMD" Tkacz',
        
'authorsite' => 'http://tkacz.pro',
        
'version' => '1.3',
        
'guid' => '233a28d0a679315aa30cf168f84c3485',
        
'compatibility' => '16*'
    
);
}

/**
 * Standard MyBB installation functions 
 * 
 */
function fastQuote_install()
{
    require_once(
'fastQuote.settings.php');
    
fastQuoteInstaller::install();

    
rebuildsettings();
}

function 
fastQuote_is_installed()
{
    global 
$mybb;

    return (isset(
$mybb->settings['fastQuoteStatus']));
}

function 
fastQuote_uninstall()
{
    require_once(
'fastQuote.settings.php');
    
fastQuoteInstaller::uninstall();

    
rebuildsettings();
}

/**
 * Standard MyBB activation functions 
 * 
 */
function fastQuote_activate()
{
    require_once(
'fastQuote.tpl.php');
    
fastQuoteActivator::activate();
}

function 
fastQuote_deactivate()
{
    require_once(
'fastQuote.tpl.php');
    
fastQuoteActivator::deactivate();
}

/**
 * Fast Quote Plugin Class 
 * 
 */
class fastQuote
{
    private 
$posts;
    private 
$quick_reply_status false;

    
/**
     * Constructor - add plugin hooks
     */
    
public function __construct()
    {
        global 
$plugins;

        
// Add all hooks
        
$plugins->hooks["parse_message_start"][10]["fastQuote_injectParser"] = array("function" => create_function('&$arg''global $plugins; $plugins->objects[\'fastQuote\']->injectParser($arg);'));
        
$plugins->hooks["postbit"][10]["fastQuote_addButton"] = array("function" => create_function('&$arg''global $plugins; $plugins->objects[\'fastQuote\']->addButton($arg);'));
        
$plugins->hooks["showthread_start"][10]["fastQuote_checkQuickReplyStatus"] = array("function" => create_function('''global $plugins; $plugins->objects[\'fastQuote\']->checkQuickReplyStatus();'));
    }
    
    
/**
     * Collect post data if full quote option is enabled
     *
     */
    
public function injectParser($message)
    {
        global 
$mybb$post;
        
        if (
THIS_SCRIPT == 'showthread.php' 
            
&& $mybb->user['uid'] > 
            
&& $mybb->settings['fastQuoteStatus'
            && 
$mybb->settings['fastQuoteFullQuote'])
        {
            
$this->posts[$post['pid']] = $post['message'];
        }
            
        return 
$message;
    }
    
    
/**
     * Check is quick reply enabled
     *
     */
    
public function checkQuickReplyStatus()
    {
        global 
$fid$forum$forumpermissions$mybb$thread;
        
        if (
$forumpermissions['canpostreplys'] != 
            
&& $mybb->user['suspendposting'] != 
            
&& ($thread['closed'] != || is_moderator($fid)) 
            && 
$mybb->settings['quickreply'] != 
            
&& $mybb->user['showquickreply'] != '0' 
            
&& $forum['open'] != 0)
        {
            
$this->quick_reply_status true;
        }
    
    }
    
    
/**
     * Add fast quote button to post data
     *
     */
    
public function addButton(&$post)
    {
        global 
$lang$mybb;

        
$post['button_quote_fast'] = '';

        if (!
$this->quick_reply_status)
        {
            return;
        }
        else if (
$mybb->settings['fastQuoteFullQuote'])
        {
            
$post['button_quote_fast'] .= '<span class="button_maly imgOpa" id="Image1"><a href="#message" onclick="addquote(\'fq' $post['pid'] . "','" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= 'Cytowanie selektywne</span></a>';
            
$post['button_quote_fast'] .= '<div style="display:none;" id="message_fq' $post['pid'] . '">' $this->posts[$post['pid']] . '</div>';
        }
        else
        {
            
$post['button_quote_fast'] .= '<span class="button_maly imgOpa" id="Image1"><a href="#message" onclick="addquote(' $post['pid'] . ",'" $post['username'] . "'";
            
$post['button_quote_fast'] .= '); insert_text(\'\r\n\'); return false;" title="' $mybb->settings['fastQuoteText'] . '">';
            
$post['button_quote_fast'] .= 'Cytowanie selektywne</span></a>';
        }
    } 

}

?>


Podmień.
Działa

Ale wyglada tak :

[Obrazek: lxgcjc.jpg]



Użytkownicy przeglądający ten wątek:

1 gości