• Mercatino: Parte 11

    Intanto si crea un nuovo template, chiamato vtp_item_info, nello stile master. Essenzialmente si tratta di una personalizzazione che appartenente al plugin, e quindi va inserito livello di stile master, per ritrovarselo poi nel codice di installazione, e sempre aggiornato. Questo inserimento però è possibile soltanto in modalità debug. Occhio a non toccare nessun altro template, in quanto non vi si aggiorna più se lo salvate, anche solo per errore o curiosità!!!

    Il codice temporaneo, copiato dal progetto vecchio e lievemente modificato, è questo:
    Codice PHP: [Visualizza]
    <table class="fieldset" width="100%" cellpadding="0" cellspacing="0" border="0">
        <
    tr>
            <
    td valign="top" width="100%">
                <
    table class="tborder" width="100%" cellpadding="0" cellspacing="0" border="0">
                    <
    tr>
                        <
    td class="thead">$vbphrase[vtp_short_description]</td>
                    </
    tr>
                    <
    tr>
                        <
    td class="alt1">{vb:raw thread.vtp_description}</td>
                    </
    tr>
                </
    table>
            </
    td>
            <
    vb:if condition="$thread[vtp_lastbidder]">
                <!-- 
    who bidded? -->
                <
    td valign="top">
                    <
    table class="tborder" cellpadding="0" cellspacing="0" border="0">
                        <
    tr>
                            <
    td class="thead" nowrap>$vbphrase[vtp_description]</td>
                            <
    td class="thead" nowrap>$vbphrase[vtp_action]</td>
                        </
    tr>
                        <
    tr>
                            <
    td class="alt2" nowrap>$vbphrase[vtp_lastbidder]</td>
                            <
    td class="alt1" nowrap><a href="member.php?u={vb:raw thread.vtp_lastbidder}" target="_blank">{vb:raw thread.vtp_biddername}</a></td>
                        </
    tr>
                        <
    tr>
                            <
    td class="alt2" nowrap>$vbphrase[vtp_who_bidded]</td>
                            <
    td class="alt1" nowrap><a href="vtp_whobid.php?t={vb:raw thread.threadid}" target="_blank">$vbphrase[vtp_show]</a></td>
                        </
    tr>
                    </
    table>
                </
    td>
            </
    vb:if>
        </
    tr>
    </
    table>

    <
    table class="fieldset" cellpadding="0" cellspacing="0" border="0">
        <
    tr>
            <
    td valign="top">
                <
    table class="tborder" cellpadding="0" cellspacing="0" border="0">
                    <
    tr>
                        <
    td class="thead">$vbphrase[vtp_bids]</td>
                        <
    td class="thead">$vbphrase[vtp_value]</td>
                        <
    td class="thead">$vbphrase[vtp_currency]</td>
                        <
    vb:if condition="$thread['vtp_links']">
                            <
    td class="thead">$vbphrase[vtp_action]</td>
                        </
    vb:if>
                    </
    tr>
                    <
    vb:if condition="$thread['vtp_state']>1">
                        <
    tr>
                            <
    td class="alt2">$vbphrase[vtp_sold]</td>
                            <
    td class="alt1">&nbsp;</td>
                            <
    td class="alt2">&nbsp;</td>
                            <
    vb:if condition="$thread['vtp_links']">
                                <
    td class="alt1">&nbsp;</td>
                            </
    vb:if>
                        </
    tr>
                    <
    vb:else />
                        <
    vb:if condition="$thread['vtp_startvalue']>0 && $thread['vtp_endvalue']==0">
                            <
    tr>
                                <
    td class="alt2">$vbphrase[vtp_start_value]</td>
                                <
    td class="alt1">{vb:raw thread.vtp_startvalue}</td>
                                <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                                <
    vb:if condition="$thread['vtp_links']">
                                    <
    td class="alt1">&nbsp;</td>
                                </
    vb:if>
                            </
    tr>
                            <
    tr>
                                <
    td class="alt2">$vbphrase[vtp_buyout_value]</td>
                                <
    td class="alt1">$vbphrase[vtp_open]</td>
                                <
    td class="alt2">&nbsp;</td>
                                <
    vb:if condition="$thread['vtp_links']">
                                    <
    td class="alt1">&nbsp;</td>
                                </
    vb:if>
                            </
    tr>
                            <
    tr>
                                <
    td class="alt2">$vbphrase[vtp_current_bid]</td>
                                <
    vb:if condition="$thread['vtp_lastbidvalue']>0">
                                    <
    td class="alt1">{vb:raw thread.vtp_lastbidvalue}</td>
                                    <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                                <
    vb:else />
                                    <
    td class="alt1">$vbphrase[vtp_none]</td>
                                    <
    td class="alt2">&nbsp;</td>
                                </
    vb:if>
                                <
    vb:if condition="$thread['vtp_links']">
                                    <
    td class="alt1"><a href="vtp_bid.php?t={vb:raw thread.threadid}&f=$_REQUEST[forumid]&page=$_REQUEST[page]">$vbphrase[vtp_place_bid]</td>
                                </
    vb:if>
                            </
    tr>
                        <
    vb:else />
                            <
    vb:if condition="$thread['vtp_startvalue']==$thread['vtp_endvalue']">
                                <
    tr>
                                    <
    td class="alt2">$vbphrase[vtp_buyout_value]</td>
                                    <
    td class="alt1">{vb:raw thread.vtp_endvalue}</td>
                                    <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                                    <
    vb:if condition="$thread['vtp_links']">
                                        <
    td class="alt1"><a href="vtp_bid.php?do=buynow&t={vb:raw thread.threadid}&f=$_REQUEST[forumid]&page=$_REQUEST[page]">$vbphrase[vtp_buy_now]</a></td>
                                    </
    vb:if>
                                </
    tr>
                            <
    vb:else />
                                <
    tr>
                                    <
    td class="alt2">$vbphrase[vtp_start_value]</td>
                                    <
    td class="alt1">{vb:raw thread.vtp_startvalue}</td>
                                    <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                                    <
    vb:if condition="$thread['vtp_links']">
                                        <
    td class="alt1">&nbsp;</td>
                                    </
    vb:if>
                                </
    tr>
                                <
    tr>
                                    <
    td class="alt2">$vbphrase[vtp_buyout_value]</td>
                                    <
    td class="alt1">{vb:raw thread.vtp_endvalue}</td>
                                    <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                                    <
    vb:if condition="$thread['vtp_links']">
                                        <
    td class="alt1"><a href="vtp_bid.php?do=buynow&t={vb:raw thread.threadid}&f=$_REQUEST[forumid]&page=$_REQUEST[page]">$vbphrase[vtp_buy_now]</a></td>
                                    </
    vb:if>
                                </
    tr>
                                <
    tr>
                                    <
    td class="alt2">$vbphrase[vtp_current_bid]</td>
                                    <
    vb:if condition="$thread['vtp_lastbidvalue']">
                                        <
    td class="alt1">{vb:raw thread.vtp_lastbidvalue}</td>
                                        <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                                    <
    vb:else />
                                        <
    td class="alt1">$vbphrase[vtp_none]</td>
                                        <
    td class="alt2">&nbsp;</td>
                                    </
    vb:if>
                                    <
    vb:if condition="$thread['vtp_links']">
                                        <
    td class="alt1"><a href="vtp_bid.php?t={vb:raw thread.threadid}&f=$_REQUEST[forumid]&page=$_REQUEST[page]">$vbphrase[vtp_place_bid]</td>
                                    </
    vb:if>
                                </
    tr>
                            </
    vb:if>
                        </
    vb:if>
                    </
    vb:if>
                </
    table>
            </
    td>
            <
    td valign="top">
                <
    table class="tborder" cellpadding="0" cellspacing="0" border="0">
                    <
    tr>
                        <
    td class="thead">$vbphrase[vtp_shipping_methods]</td>
                        <
    td class="thead">$vbphrase[vtp_price]</td>
                        <
    td class="thead">$vbphrase[vtp_currency]</td>
                    </
    tr>
                    <
    vb:if condition="$thread['vtp_price1']>0">
                        <
    tr>
                            <
    td class="alt2">{vb:raw thread.vtp_xshipping1}</td>
                            <
    td class="alt1">{vb:raw thread.vtp_price1}</td>
                            <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                        </
    tr>
                    <
    vb:else />
                        <
    tr>
                            <
    td class="alt2">$vbphrase[vtp_none]</td>
                            <
    td class="alt1">&nbsp;</td>
                            <
    td class="alt2">&nbsp;</td>
                        </
    tr>
                    </
    vb:if>
                    <
    vb:if condition="$thread['vtp_price2']>0">
                        <
    tr>
                            <
    td class="alt2">{vb:raw thread.vtp_xshipping2}</td>
                            <
    td class="alt1">{vb:raw thread.vtp_price2}</td>
                            <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                        </
    tr>
                    </
    vb:if>
                    <
    vb:if condition="$thread['vtp_price3']>0">
                        <
    tr>
                            <
    td class="alt2">{vb:raw thread.vtp_xshipping3}</td>
                            <
    td class="alt1">{vb:raw thread.vtp_price3}</td>
                            <
    td class="alt2">{vb:raw vboptions.vtp_option_currency_code}</td>
                        </
    tr>
                    </
    vb:if>
                </
    table>
            </
    td>
            <
    td valign="top">
                <!-- 
    payment methods -->
                <
    table class="tborder" cellpadding="0" cellspacing="0" border="0">
                    <
    tr>
                        <
    td class="thead">$vbphrase[vtp_payment_methods]</td>
                    </
    tr>
                    <
    tr>
                        <
    td class="alt1">{vb:raw thread.vtp_xpayment1}</td>
                    </
    tr>
                    <
    vb:if condition="$thread['vtp_payment2']">
                        <
    tr>
                            <
    td class="alt1">{vb:raw thread.vtp_xpayment2}</td>
                        </
    tr>
                    </
    vb:if>
                    <
    vb:if condition="$thread['vtp_payment3']">
                        <
    tr>
                            <
    td class="alt1">{vb:raw thread.vtp_xpayment3}</td>
                        </
    tr>
                    </
    vb:if>
                </
    table>
            </
    td>
        </
    tr>
    </
    table
    Il template contiene un numero consistente di nuovi frasi e variabili, che si dovranno inserire nel frasario e nel database, e infine abilitare a tutto il prodotto.

    Commenti 4 Commenti
    1. L'avatar di Ricsca
      Ricsca -
      Sempre più interessante...
    1. L'avatar di franuliv
      franuliv -
      Un grazie particolare a chi si sta adoperando alla realizzazione di questo Mercatino!!

      Chiedo gentilmente se potete darmi un tempo per il termine di questo splendito Mercatino che state creando e che ritengo una vera svolta per il vbullettin..

      Mi potete dire quando che lo volevo installare sulla mia board?

      Grazie... Francesco
    1. L'avatar di y2ksw
      y2ksw -
      Dato che sono estremamente impegnato su tutti i fronti immaginabili, questo progetto dovrà purtroppo attendere. Il termine era previsto due mesi fa. Non sono in grado di dire quando cesserà il carico di compiti da svolgere, per poter terminarlo, anche perché manca davvero poco per iniziare a usarlo.

      La fortuna vuole che gran parte del codice esiste già, per cui tocca soltanto la revisione e adattamento da vBulletin 3.5 alla versione 4.
    1. L'avatar di franuliv
      franuliv -
      Ti ringrazio infinitamente della risposta. Spero di vero cuore che ti terminino l'ardui compiti e che tu possa completare questo spendido lavoro importante.
      Grazie Francesco