Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
  1. La community italiana di SEO, marketing digitale e AI
  2. Categorie
  3. Coding e Sistemistica
  4. Coding
  5. Aiuto BBcode you tube

Aiuto BBcode you tube

Pianificato Fissato Bloccato Spostato Coding
1 Post 1 Autori 449 Visualizzazioni 1 Seguito
  • Da Vecchi a Nuovi
  • Da Nuovi a Vecchi
  • Più Voti
Rispondi
  • Risposta alla discussione
Effettua l'accesso per rispondere
Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
  • F
    F
    forumdonne
    scritto su ultima modifica di
    User Attivo 5
    #1
    Aiuto BBcode you tube

    Ciao a tutti, ho bisogno del vostro aiuto, da sola proprio non ci riesco.
    Voglio a tutti i costi permettere l'inserimento dei video youtube sul social network di Zoint.

    Ho pensato, visto che non riesco a creare un blocco, di modificare il blocco dei commenti inserendoci da qualche parte il codice (in php) per permettere ad un utente di inserire un video youtube.

    Il codice è questo:

    <?php
    error_reporting(E_ALL & ~E_NOTICE);
    
    $this->zopts['editlimit'] = 3600;
    
    class mod_quick_comments extends z_module
    {
        var $aopts =  array('maxcomments' => array('type' => VAR_UINT, 'value' => 20)
        );
        
        function update($content)
        {
            $content['opts']['limit'] = intval($content['opts']['limit']);
            $content['opts']['avatars'] = intval($content['opts']['avatars']);
    
            if ($content['opts']['limit'] > $this->get_adminopt('maxcomments'))
            {
                $this->_zoints->throw_error('max comments block limit', $this->get_adminopt('maxcomments'));
            }
    
            return $content;
        }
        
        function edit()
        {
            $content = $this->content;
            $html = '';
    
            if (empty($content['opts']))
            {
                $content['opts']['limit'] = 8;
                $content['opts']['avatars'] = true;
            }
    
            if ($content['opts']['avatars'])
            {
                $avataryes = ' checked="checked"';
            }
            else
            {
                $avatarno = ' checked="checked"';
            }
    
            $html .= '<div class="pmain1"><table cellpadding="2" cellspacing="0">
            <tr>
            <td>'. L('num-of-comments') .':&nbsp;&nbsp;</td><td><input name="mod[content][opts][limit]" type="text" size="2" value="' . $content['opts']['limit'] . '" /> ('. L('max') .': ' . $this->get_adminopt('maxcomments') . ')</td>
            </tr>
            <tr>
            <td>'. L('display-avatars') .'</td>
            <td><input type="radio"' . $avataryes . ' name="mod[content][opts][avatars]" value="1" /> '. L('yes') .' <input type="radio"' . $avatarno . ' name="mod[content][opts][avatars]" value="0" /> '. L('no') .'</td>
            </tr>
            </table>
            </div>';
    
            return $html;
        }
    
        function contents()
        {
            $html = '';
            $content =& $this->content;
    
            if (!is_array($content['opts']) OR !count($content['opts']))
            {
                $content['opts']['limit'] = 8;
                $content['opts']['avatars'] = true;
            }
    
            // If the block is not yet active, this will prevent a db error
            $this->linkid = intval($this->linkid);
    
            if ($this->_zoints->_user->logged_in())
            {
                $html .= '<div class="' . $this->style[$this->switch_bg()] . '"><a href="' . $this->_zoints->url('comments', 'cmd=newreply&amp;modid=' . $this->linkid . '&amp;rtab=' . $this->tab->info['tabid']) . '"><img class="zicon" src="' . IMAGEDIR . 'icon_add.gif" alt="" /></a><a href="' . $this->_zoints->url('comments', 'cmd=newreply&amp;modid=' . $this->linkid . '&amp;rtab=' . $this->tab->info['tabid']) . '">'. L('add-comment') .'</a></div>';
            }
    
            $getposts = $this->_db->query_read("
                    SELECT  post.postid, post.userid, user.username, dateline, comment, comment_parsed, private,   avatar
                    FROM " . ZPRE . "profile_post_ids pids
                    LEFT JOIN " . ZPRE . "profile_post post ON (pids.postid = post.postid)
                    LEFT JOIN " . ZPRE . "user user ON (post.userid = user.userid)
                    WHERE pids.modid = " . $this->linkid . " AND pids.masterid = " . $this->zuser . (!$this->powner ? ' AND private = 0 OR (pids.masterid = ' . $this->zuser . ' AND private = 1 AND post.userid = ' . $this->_zoints->_user->get('userid') . ')' : '') . "
                    ORDER BY dateline DESC
                    LIMIT " . $content['opts']['limit']
            );
            if ($this->_db->num_rows($getposts))
            {
                $tmpposts = array();
                while ($post = $this->_db->fetch_array($getposts))
                {
                    $this->_zoints->cache_avatar($post['userid']);
                    $tmpposts[] = $post;
                }
    
                foreach ($tmpposts as $post)
                {
                    $bgclass = $this->style[$this->switch_bg()];
                    
                    //$post['comment_parsed'] = $this->_zoints->word_wrap($post['comment_parsed'], '400px');
    
                    // Main header w/ date, reply, delete, & edit options
                    $html .= '<div><div class="' . $this->style['phead'] . ' pad3"><div class="f_right" style="margin-top: -5px;">' . 
                        ($post['private'] ? ' (' . L('private-post') . ')' : '') . 
    
                        ((!$post['private'] AND $this->_zoints->_user->logged_in()) ? 
                            '<a href="' . $this->_zoints->url('comments', 'cmd=newreply&amp;rtab=' . $this->tab->info['tabid'] . '&amp;postid=' . $post['postid']) . '"><img class="zicon" src="' . IMAGEDIR . 'quote-button.png" alt="' . L('quote-post') . '" title="' . L('quote-post') . '" border="0"  width="43" height="16" /></a>' : '') . 
    
                        (($this->_zoints->_user->get('userid') == $post['userid'] AND $post['dateline'] > (TIME - $this->zopts['editlimit'])) ? 
                            '<a href="' . $this->_zoints->url('comments', 'cmd=editpost&amp;postid=' . $post['postid']) . '"><img class="zicon" src="' . IMAGEDIR . 'icon_edit.gif" alt="' . L('edit-post') . '" title="' . L('edit-post') . '" border="0" /></a>' : '') . 
    
                        ((($this->_zoints->_user->get('userid') == $post['userid'] AND $post['dateline'] > (TIME - $this->zopts['editlimit'])) OR $this->powner) ? 
                            '<a href="' . $this->_zoints->url('comments', 'cmd=delconf&amp;postid=' . $post['postid']) . '&amp;modid=' . $this->linkid . '"><img class="zicon" src="' . IMAGEDIR . 'icon_delete.gif" alt="' . L('delete-post') . '" title="' . L('delete-post') . '" border="0" /></a>' : '') . 
                        '</div>' . $this->_zoints->external->date($post['dateline']) . '</div>';
    
                    // Start content with the avatar, username, and post text
                    $html .= '<div class="' . $bgclass . ' pad3"><div class="f_left"><div style="font-weight:bold;margin-bottom: 2px;"><a href="' . $this->_zoints->profile_url($post) . '">' . $post['username'] . '</a></div>';
                    
                    if ($content['opts']['avatars'])
                    {
                        $html .= '<a href="' . $this->_zoints->profile_url($post) . '">' . $this->_zoints->get_avatar($post) . '</a>';
                    }
                    
                    $html .= '</div><div class="clear">' . $post['comment_parsed'] . '</div></div></div>';
                }
            }
            else
            {
                $html .= '<div class="' . $this->style['pmain1'] . '">'. L('no-comments') .'</div>';
            }
    
            $html .= '<div class="' . $this->style[$this->switch_bg()] . '"><img src="' . IMAGEDIR . 'spacer.gif" height="10" width="1" alt="" /></div><div class="' . $this->style[$this->switch_bg()] . '">' . 
                ($this->_zoints->_user->logged_in() ? '<a href="' . $this->_zoints->url('comments', 'modid=' . $this->linkid) . '"><img class="zicon" src="' . IMAGEDIR . 'icon_view.gif" border="0" alt="" /></a><a href="' . $this->_zoints->url('comments', 'modid=' . $this->linkid) . '">'. L('view-all-comments') .'</a>' : '') . 
                ($this->_zoints->_user->logged_in() ? '<div style="margin-top:4px"><a href="' . $this->_zoints->url('comments', 'cmd=newreply&amp;modid=' . $this->linkid . '&amp;rtab=' . $this->tab->info['tabid']) . '"><img class="zicon" src="' . IMAGEDIR . 'icon_add.gif" alt="" /></a><a href="' . $this->_zoints->url('comments', 'cmd=newreply&amp;modid=' . $this->linkid . '&amp;rtab=' . $this->tab->info['tabid']) . '">'. L('add-comment') .'</a></div>' : '') . '</div>';
    
            return $html;
        }
        
        function adminopts()
        {
            $this->_zoints->lang->load('modules/general_aopts');
            
            $html = '<label>'  . L('max-comments') . ': <input type="text" name="aopts[maxcomments]" value="' . $this->get_adminopt('maxcomments') . '" size="2" maxlength="2" /></label>';
            
            return $html;
        }
    }
    
    
    ?>
    

    Grazie a tutti per l'aiuto.

    1 Risposta Ultima Risposta
    Miglior risposta 0
    0

    Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.

    Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.

    Con il tuo contributo, questo post potrebbe essere ancora migliore 💗

    Registrati Accedi
    Rispondi
    • Risposta alla discussione
    Effettua l'accesso per rispondere
    • Da Vecchi a Nuovi
    • Da Nuovi a Vecchi
    • Più Voti


    • Accedi

    • Non hai un account? Registrati

    • Accedi o registrati per effettuare la ricerca.
    • Primo post
      Ultimo post
    Home Accedi Registrati
    Menu
    • CATEGORIES
    • La Community Connect.gt
    • Presentati alla Community
    • News Ufficiali da Connect.gt
    • Internet News
    • A Scuola Di
    • Digital Marketing
    • Intelligenza Artificiale
    • SEO & GEO
    • Web Marketing e Content
    • Google Analytics e Web Analytics
    • Google Ads & Advertising
    • YouTube
    • TikTok, Instagram e altri Social
    • Google Adsense, Affiliazioni e Guadagno
    • E-Commerce
    • Coding e Sistemistica
    • Help Center: consigli per il tuo progetto
    • Hosting e Cloud
    • Coding
    • CMS & Piattaforme Self-Hosted
    • Annunci e Collaborazioni
    • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
    • Collaborazioni WEB e Lavoro: offro e cerco
    • Impresa, Fisco e Leggi
    • Consulenza Legale e Professioni Web
    • Consulenza Fiscale, Imprese, Startup e P.Iva
    • Gli Off Topic
    • PC, Smartphone e altri Hardware
    • Tutti i Software
    • GT Fetish Cafè
    • Discussioni
    • Non letti 0
    • Recenti
    • Hashtag
    • Popolare
    • Utenti
    • Privacy
    • Termini e condizioni
    • © 2026 Search On Media Group S.r.l.