Logo e ling fissi in alto

3 partecipanti

Risolto Logo e ling fissi in alto

Messaggio Da gandalf77 Ven 16 Set 2022 - 12:29

Buongiorno.
Ho settato la barra di navigazione di "Forumattivo" in alto alla pagina del mio forum (e mi sta bene) ma non riesco a trovare il settaggio del logo del forum e dei link in maniera tale che non vengano più fissati in cima alla pagina quando si scorre verso il basso, o tutt'al più lasciare solo i link di navigazione come in questo forum.
Come fare?
avatar
gandalf77
****

Messaggi : 254

https://www.passionetennis.com/
gandalf77 è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da MattiaDes Sab 17 Set 2022 - 23:13

Ciao, hai usato per caso qualche personalizzazione per fissare il logo e il menu di navigazione?

Prova a guardare tra i codici javascript, perchè basta disattivare quello che genera questo effetto Very Happy


Logo e ling fissi in alto Z_user10

Logo e ling fissi in alto 1300 Logo e ling fissi in alto 2203 Logo e ling fissi in alto 392
MattiaDes
MattiaDes
Amministratore
Amministratore

Sesso : Maschio
Età : 28
Messaggi : 5129
Località : Italy

http://www.habbolifeforum.com
MattiaDes è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da gandalf77 Mar 20 Set 2022 - 16:21

Nulla tra quei codici, nemmeno su CSS.
Non vorrei aver preso qualcosa dai tutorial ed aver modivicato il codice in qualche templates.....adesso non ricordo
avatar
gandalf77
****

Messaggi : 254

https://www.passionetennis.com/
gandalf77 è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da Niko Mar 20 Set 2022 - 16:23

@gandalf77 riusciresti a controllare?
Hai templates modificati?
Hai codici javascript inseriti? Wink
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9432
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da gandalf77 Mar 20 Set 2022 - 16:55

Ho provato ad eliminare tutti i CSS.....niente da fare.
Come Javascript ho inserito quelli inerenti queste funzioni:
- Argomenti simili
Codice:
/* The following code is DOM-dependent. It may not work if you modify the posting structure in the forum templates */

/*

    Similar Topics for Forumotion

    Version: 1.1.2
    Author: Flerex Ferwin
   
*/


/* The following code is DOM-dependent. It may not work if you modify the posting structure in the forum templates */

var FLRX = FLRX || {};

FLRX.similarTopics = (function () {

    'use strict';

    let settings = { // default settings
        forums : [],
        searchIn : false,
        maxTopics : 10,
        wordMinLength: 4,
        triggerWhenWriting: true,
        hideAtFocusout: false,


        autocomplete: false, // disable browser autocomplete from subject input

        /* Advanced settings */
        excludedCharacters : new RegExp(/[.,\/#!$%\^&\*¿?!¡;:{}\\=\-_`~"«“‘’”»()\[\]]/, 'g'), // The ignored characters from the topic title.
        dom : { // default settings (should work if left like this with unmodified templates)

            /* Search page */
            topicscontainer : '.forabg',
            topic          : 'dd.dterm',
            titlelink      : '.topictitle',
            userlink        : 'a[href^="/u"]',
            forumlink      : 'a[href^="/f"]',
            topicicon      : { img: false, selector: 'dl.icon' },

            /* structure */
            visible        : 'visible',

            /* posting page */
            titleinput      : '#postingbox input[name="subject"]',
            inputcontainer  : 'dl',

            /* created elements */
            maincontainer  : $('<div />', { id : 'similarTopics' }),
            similartopiccont : $('<div />', { class : 'topic-container' }),
            loadingelm      : $('<div />', { class : 'spinner' })
                                .append($('<div/>', { class:'double-bounce1' }))
                                .append($('<div/>', { class:'double-bounce2' })),
            topicelmcont    : $('<div />', { class: 'topic' }),
            topicelmtitle  : $('<div />', { class: 'topic-title' }),
            topicdatacont  : $('<div />', { class: 'topic-data' }),
            topicflags      : $('<div />', { class: 'topic-flags' }),
            topiciconcont  : $('<div />', { class: 'topic-icon' }),
            topicstatus    : $('<div />', { class: 'topic-status' }),
            topicelminfo    : $('<div />', { class: 'topic-info' }),
            topicauthor    : $('<span />', { class: 'topic-author', text: 'postato da ' }),
            topicforum      : $('<span />', { class: 'topic-forum', text: ' su ' }),
            similarstitle  : $('<h4 />', { class: 'similarTopics-title', text: 'Forse sei interessato a...' }),

        },
    },

    structure = {},

    request,

    debounce = function(cb, delay) {
        let timeout;
        return function(...a) {
            clearTimeout(timeout);
            timeout = setTimeout( _ arrow { timeout = null;  cb.call(this, ...a);  }, delay);
        };
    },

    /* transforms a UTF8-encoded URI into Windows-1252 */
    sanitizeURI = function(uri) {

        /* For some reason Forumotion uses Windows-1252 encoding in search URIs.
        This workaround will only fix issues with Spanish characters */

        return uri.replace(/%C3%91/g, '%D1') // Ñ
            .replace(/%C3%B1/g, '%F1') // ñ
            .replace(/%C3%81/g, '%C1') // Á
            .replace(/%C3%89/g, '%C9') // É
            .replace(/%C3%8D/g, '%CD') // Í
            .replace(/%C3%93/g, '%D3') // Ó
            .replace(/%C3%9A/g, '%DA') // Ú
            .replace(/%C3%9C/g, '%DC') // Ü
            .replace(/%C3%A1/g, '%E1') // á
            .replace(/%C3%A9/g, '%E9') // é
            .replace(/%C3%AD/g, '%ED') // í
            .replace(/%C3%B3/g, '%F3') // ó
            .replace(/%C3%BA/g, '%FA') // ú
            .replace(/%C3%BC/g, '%FC'); // ü
    },

    /* returns an object array (representation of topics) from a search URL synchronously */
    searchTopics = function(url, cb) {
        $.ajax({
            url : url,
        }).done(function(data) {
            let relatedTopics = [],
                $forabg = $(settings.dom.topicscontainer, data);
            if($forabg.length) {
                $forabg.find(settings.dom.topic).slice(0, settings.maxTopics).each(function() {
                   
                    let $this = $(this),
                    $topictitle = $this.find(settings.dom.titlelink),
                    $forumlink = $this.find(settings.dom.forumlink),
                    $userlink = $this.find(settings.dom.userlink),
                    $topicicon = settings.dom.topicicon.img
                        ? $this.find(settings.dom.topicicon.selector)
                        : $this.closest(settings.dom.topicicon.selector);

                    let status;
                    if(settings.dom.topicicon.img) {
                        status = $topicicon.attr('src');
                    } else {
                        status = $topicicon.css('background-image').length
                            ? $topicicon.css('background-image').slice(4, -1).replace(/"/g, '')
                            : false;
                    }

                    relatedTopics.push({
                        title  : $topictitle.text().trim(),
                        url    : $topictitle.attr('href'),
                        icon  : $this.css('background-image').slice(4, -1).replace(/"/g, ''),
                        status,
                        forum  : {
                            name : $forumlink.text(),
                            url  : $forumlink.attr('href'),
                        },
                        user  : {
                            name : $userlink.text(),
                            url  : $userlink.attr('href'),
                        },
                    });
                });
            }

            cb.call(this, relatedTopics);
        }).fail(_ arrow {let up; throw up || false});
    },

    /* returns an array with the words of a string that fulfil conditions of settings.excludedCharacters */
    getWords = function(str) {
        return str.trim().replace(settings.excludedCharacters, '').split(' ').filter(elm arrow elm.length >= settings.wordMinLength);
    },

    /* updates the similar topics DOM structure with the ones in the input array */
    updateDOM = function(arr) {

        structure.topiccontainer.empty();

        if(arr.length) {
            let docfrag = document.createDocumentFragment();
            $.each(arr, function(index, topic) {

                let $topicTitle = settings.dom.topicelmtitle.clone(),
                $topicContainer = settings.dom.topicelmcont.clone(),
                $topicInfo      = settings.dom.topicelminfo.clone(),
                $topicauthor    = settings.dom.topicauthor.clone(),
                $topicstatus    = settings.dom.topicstatus.clone(),
                $topicforum    = settings.dom.topicforum.clone(),
                $topicflags    = settings.dom.topicflags.clone(),
                $topicdata      = settings.dom.topicdatacont.clone(),
                $topicicon      = settings.dom.topiciconcont.clone(),

                /* link creation */
                $topicLink  = $('<a />', { target: '_blank', href: topic.url, text: topic.title }),
                $forumlink  = $('<a />', { target: '_blank', href: topic.forum.url, text: topic.forum.name }),
                $authorlink = $('<a />', { target: '_blank', href: topic.user.url, text: topic.user.name });

                $topicicon.css('background-image', `url('${ topic.icon }')`);
                topic.status && $topicstatus.css('background-image', `url('${ topic.status }')`);

                $topicauthor.append($authorlink);
                $topicforum.append($forumlink);
                $topicTitle.append($topicLink);
                $topicInfo.append($topicauthor, $topicforum);
                $topicdata.append($topicTitle, $topicInfo);
                $topicflags.append($topicstatus, $topicicon);
                $topicContainer.append($topicflags, $topicdata);

                docfrag.append($topicContainer[0]);

            });
            structure.topiccontainer[0].appendChild(docfrag);
           
        } else
            structure.maincontainer.removeClass(settings.dom.visible);
           
    },

    setLoadingStatus = function() {
        structure.loadingcontainer.addClass(settings.dom.visible);
        structure.recentstitle.removeClass(settings.dom.visible);
        structure.topiccontainer.removeClass(settings.dom.visible);
    },
    topicsRetrieved = function (){
        structure.loadingcontainer.removeClass(settings.dom.visible);
        structure.recentstitle.addClass(settings.dom.visible);
        structure.topiccontainer.addClass(settings.dom.visible);
    },

    searchAlgorithm = function(words, cb) {
        let params = {
            search_where    : settings.searchIn || `f${/\?f=(\d+)/.exec(location.search)[1]}`,
            show_results    : 'topics',
            sort_by        : 0,
            sort_dir        : 'DESC',
            search_terms    : 'all',
            search_keywords : words.join(' '),
        };

        searchTopics(`/search?${sanitizeURI($.param(params))}`, function(arr) {
            let relatedTopics = arr;

            if(relatedTopics.length < settings.maxTopics) {
                params.search_terms = 'any';
                searchTopics(`/search?${sanitizeURI($.param(params))}`, function(arr) {
                    let searchAnyWord = arr,
                    neededElms = settings.maxTopics - relatedTopics.length;
                    searchAnyWord = searchAnyWord.filter(elm arrow relatedTopics.find(e arrow e.url == elm.url) === undefined); // Ignore duplicates
                    relatedTopics = [...relatedTopics, ...searchAnyWord.slice(0, neededElms)];

                    cb.call(this, relatedTopics);

                });
            }
           
            cb.call(this, relatedTopics);

        });

    },
    hideSimilarTopics = function() {
        structure.maincontainer.removeClass(settings.dom.visible);
    },

    showSimilarTopics = function() {
        structure.maincontainer.addClass(settings.dom.visible);
    },

    /* main function */
    searchSimilarTopics = function($title) {
        let words = getWords($title.val());
       

        if(words.length == 0) {
            hideSimilarTopics();
            return;
        }

        // for the first time, if it was hidden
        showSimilarTopics();

        setLoadingStatus();

        searchAlgorithm(words, function(arr) {
            updateDOM(arr);
            topicsRetrieved();
        });

    },
    generateStructure = function($title) {
        let $similarTopics = settings.dom.maincontainer.clone(),
        $spinner = settings.dom.loadingelm.clone(),
        $topicsContainer = settings.dom.similartopiccont.clone(),
        $recentsTitle = settings.dom.similarstitle.clone();
       
        structure = {
            maincontainer    : $similarTopics,
            loadingcontainer : $spinner,
            topiccontainer  : $topicsContainer,
            recentstitle    : $recentsTitle,
        };

        $similarTopics.append($spinner, $recentsTitle, $topicsContainer);

        $title.closest(settings.dom.inputcontainer).after($similarTopics);
    },
    init = function(options) {
        $.extend(true, settings, options);

        let timeout,
        $title = $(settings.dom.titleinput);

        if(!settings.autocomplete)
            $title.attr('autocomplete', 'off');

        // append the basic dom structure (should be hidden by default with CSS)
        generateStructure($title);

        if(settings.triggerWhenWriting)
            $title.on('keypress', debounce(function(e) {
                if(e.which !== 0)
                    searchSimilarTopics($title);
            }, 500));
        else
            $title.on('focusout', function() {
                searchSimilarTopics($title);
            });

        if(settings.triggerWhenWriting && settings.hideAtFocusout)
            $title.on('focusout', function() {
                hideSimilarTopics();
            });

    };


    /* API :-) */
    return {
        init : init,
    };

})();


!function() {

    const settings = {
        forums : [1,2,3,4,5,6,7], // Forum IDs (separated by comma) where the "Similar Topics" feature will be enabled. Set to true to enable the feature everywhere (not recommended).
        searchIn : '-1', // Where the searches will take place. Use -1 to search everywhere. If not set, it will search the forum where the topic is being created
        maxTopics : 5, // Maximum amount of topics shown
    };


    location.pathname == '/post' &&
    location.search.indexOf('&mode=newtopic') > -1 &&
    (settings.forums === true || settings.forums.some(id arrow location.search.indexOf(`?f=${id}`) > -1)) &&
    $(function() {
        FLRX.similarTopics.init(settings);
    });

}();

- Avatar utente nei tag
Codice:
(function() {
  window.faMentionAvatar = {
    // position modifies the position of the avatar
    // 0 = before mention
    // 1 = after mention
    position : 0,
    cacheTime : 1*60*60*1000, // amount of time the avatar is cached ( 1 hour )
 
    mentions : null, // mention node list
    index : -1, // current index in the mentions array
 
    // checks if the mention is valid and then gets the avatar
    getter : function() {
      var mention = faMentionAvatar.mentions[++faMentionAvatar.index],
          storage = window.localStorage,
          id;
     
      if (mention) {
        id = mention.href.replace(/.*?\/u/, '');
   
        if (storage && storage['mentionAvatar_' + id] && storage['mentionAvatar_' + id + '_exp'] > +new Date - faMentionAvatar.cacheTime) {
          var avatar = document.createElement('IMG');
          avatar.className += ' mention-ava';
          avatar.src = storage['mentionAvatar_' + id];
          faMentionAvatar.position ? mention.appendChild(avatar) : mention.insertBefore(avatar, mention.firstChild);
          faMentionAvatar.getter();
        } else {
          $.get('/ajax/index.php?f=m&user_id=' + id, function(d) {
            var avatar = $('.tooltip-content > img', d)[0];
           
            if (avatar) {
              faMentionAvatar.position ? mention.appendChild(avatar) : mention.insertBefore(avatar, mention.firstChild);
         
              if (storage) {
                storage['mentionAvatar_' + id] = avatar.src;
                storage['mentionAvatar_' + id + '_exp'] = +new Date;
              }
            }
            faMentionAvatar.getter();
          });
        }
      }
    }
  };
 
  // write the stylesheet into the HEAD section
  document.write('<style type="text/css">.mentiontag img { height:20px; width:20px; vertical-align:middle; border-radius:100px; background:#FFF; box-shadow:0px 1px 1px rgba(0, 0, 0, 0.3), 0px -0px 1px rgba(0, 0, 0, 0.3); margin:1px 3px; padding:1px; }</style>');
 
  // statements that need execution when the document is ready
  $(function() {
    faMentionAvatar.mentions = $('.mentiontag');
    faMentionAvatar.getter();
  });
}());


- Redirezione immediata dopo il posting
Codice:
(function() {
  for (var meta = document.getElementsByTagName('META'), i = 0, j = meta.length; i < j; i++) {
    if (meta[i].httpEquiv && /refresh/i.test(meta[i].httpEquiv)) {
      window.location.href = meta[i].content.replace(/^.*;url=/, '');
      break;
    }
  }
}());

- Tag utenti
Codice:
/* VERSIONI DEI FORUM
    * 0 = PHPBB2
    * 1 = PHPBB3
    * 2 = PUNBB
    * 3 = INVISION
    */
    $(function() {
      var version = 1;
   
      if (/mode=reply/.test(window.location.search) && my_getcookie('fa_mention')) {
        document.post.message.value += '@"' + my_getcookie('fa_mention') + '" ';
        my_setcookie('fa_mention','');
      } if (!/\/t\d+/.test(window.location.pathname)) return;
   
      for (var a = $(['.name strong a', '.postprofile dt strong a', '.username a', '.postprofile dt a ~ a'][version]), b, i = 0, j = a.length, t = document.getElementById('text_editor_textarea'); i<j; i++) {
        b = document.createElement('A');
        b.title = 'Tagga ' + $(a[i]).text();
        b.style.marginRight = '3px';
        b.className = 'fa-mention';
        b.innerHTML = '@';
        b.href = '#';
        b.onclick = function() {
          var n = this.title.replace(/^.*?\s/,'');
       
          if ($.sceditor) t.insertText('@"' + n + '" ');
          else {
            my_setcookie('fa_mention', n);
            window.location.href = '/post?t=' + window.location.pathname.replace(/\/t(\d+)-.*/,'$1') + '&mode=reply';
          }
       
          return false;
        };
   
        a[i].parentNode.insertBefore(b, a[i]);
      }
   
      $(function(){
        if (!$.sceditor) return;
        t=$(t).sceditor('instance');
      });
    });

Qualche template è modificato ..... Ho fatto la prova a ripristinare il template "Cima di pagina" ma niente da fare.
Provo a fare la stessa prova in tutti gli altri?
avatar
gandalf77
****

Messaggi : 254

https://www.passionetennis.com/
gandalf77 è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da Niko Mer 21 Set 2022 - 10:31

Prova a fare "Torna al valore predefinito dei template: SI" e vedere se torna normale il banner Wink

così non devi provare template per template Logo e ling fissi in alto 3706843607
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9432
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da gandalf77 Mer 21 Set 2022 - 16:48

Ho fatto questa prova e....si....sembrerebbe esserci qualcosa seminato tra le pagine, infatti si è sbloccato.
Adesso vado a comparare vecchi e nuovi codici e vediamo cosa ne esce fuori.
Grazie per l'assistenza.
avatar
gandalf77
****

Messaggi : 254

https://www.passionetennis.com/
gandalf77 è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da Niko Mer 21 Set 2022 - 19:55

Fammi saper @gandalf77 Logo e ling fissi in alto 3706843607
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9432
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da MattiaDes Gio 22 Set 2022 - 21:27

Sì esatto, sospettavo fosse una modifica lato template happy

Sicuramente è un codice javascript che hai aggiunto direttamente lato template. Questi sono quelli che hai personalizzato:

index_body
overall_header
vietopic_body
overall_footer_end

Quelli personalizzati da mobile non centrano. Potrebbe essere qualche codice che hai aggiunto in overall_footer_end


Logo e ling fissi in alto Z_user10

Logo e ling fissi in alto 1300 Logo e ling fissi in alto 2203 Logo e ling fissi in alto 392
MattiaDes
MattiaDes
Amministratore
Amministratore

Sesso : Maschio
Età : 28
Messaggi : 5129
Località : Italy

http://www.habbolifeforum.com
MattiaDes è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da Niko Ven 28 Ott 2022 - 20:38

.Logo e ling fissi in alto HURHAdp.Caro utente,

ricordati che se il tuo problema ha ricevuto una risposta o può essere considerato risolto, è necessario premere sul bottone Logo e ling fissi in alto ZVvGmet così da inserire l'icona risolto e facilitare il lavoro del personale.

Grazie per la tua collaborazione Wink
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9432
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Risolto Re: Logo e ling fissi in alto

Messaggio Da Niko Lun 12 Dic 2022 - 20:26

.Logo e ling fissi in alto UUqryIu.Caro utente,

questo problema è stato considerato risolto o abbandonato.

Purtroppo, secondo il nostro regolamento, se l'argomento non riceve risposta da più di 7 giorni, viene considerato risolto o abbandonato.
Nei prossimi topic di supporto che aprirai:
  • Se il problema non è risolto
    dovrai fare un messaggio di UP dopo 24 ore dal tuo ultimo messaggio cosi da riportare il problema agli occhi del personale
  • Se il problema è risolto
    è necessario premere sul bottone Logo e ling fissi in alto ZVvGmet così da inserire l'icona risolto e facilitare il lavoro del personale


Ci vediamo su Forumattivo Wink
Niko
Niko
Moderatore
Moderatore

Sesso : Maschio
Età : 27
Messaggi : 9432
Località : Provincia di Varese

https://www.fmcodes.net/
Niko è stato ringraziato dall'autore di questo topic.

Visualizza l'argomento precedente Visualizza l'argomento successivo Torna in alto

- Argomenti simili

 
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.