Toplam 1 adet sonuctan sayfa basi 1 ile 1 arasi kadar sonuc gösteriliyor
  1. #1

    Standart Integration with vBulletin - Accelerated Mobile Pages for vBulletin

    What is AMP?
    https://www.ampproject.org/

    Info
    When Google announced AMP, I realized I'd eventually need AMP support for my vBulletin forum. After reading the AMP implementation docs, I decided to modify printthread.php file since It only displays the basic elements and contents of a thread. So, you got the idea...

    Implementation

    1. You will upload 1 file to forum root: amp.php
    2. You will edit /includes/class_bbcode.php and edit/replace a few lines.
    3. You will add two new templates, and edit a few.
    4. You will probably want to customize the <style amp-custom> CSS in ampthread template.

    Demo

    1. Visit any thread from https://www.msxlabs.org homepage.
    2. Scroll down to footer; you will see the AMP link at the left bottom corner, click on it. It will open the AMP version of the thread.
    3. The link is there for quick access to AMP version of a thread, It is not mandatory, nor It is used by AMP recognation.

    Installation

    1. Download and extract the ZIP file.
    2. Upload the amp.php file to your forum root folder (same folder with showthread.php)
    3. Add a new template called "ampthread" and copy the template content from ampthread_template.txt file.
    4. Add a new template called "ampthreadbit" and copy the template content from ampthreadbit_template.txt file.
    5. Edit your bbcode_quote template and replace It's content with bbcode_quote.txt file's.
    6. Edit includes/class_bbcode.php, find:

    scription">PHP- Kodu:
    if ($do_imgcode AND ($this->registry->userinfo['userid'] == OR $this->registry->userinfo['showimages'])) 
    replace with

    description">PHP- Kodu:
    if ($do_imgcode AND ($this->registry->userinfo['userid'] == OR $this->registry->userinfo['showimages']) OR THIS_SCRIPT == 'amp'//amp hack 
    find:

    PHP- Kodu:
    return '<img src="' .  $link '" border="0" alt="" />'
    replace with:

    PHP- Kodu:
    if (THIS_SCRIPT == 'amp') {    return '<amp-img layout="responsive" src="' .  $link '" width="300" height="250" alt=""></amp-img>';}    else { return '<img src="' .  $link '" border="0" alt="" />';    } //amp hack 
    Save and upload class_bbcode.php (overwrite).

    Edit SHOWTHREAD template and add

    PHP- Kodu:
    <link rel="amphtmlhref="http://www.vbulletin.com/amp.php?t=$threadid<if condition="$pagenumber>1">&amp;page=$pagenumber</if>" /> 
    1. before </head>. Don't forget to change "yourforum.com" URL with yours.
    2. Edit ampthread template and change "vbulletin.com" with your forum URL:


    PHP- Kodu:
    <link rel="canonical" href="http://www.vbulletin.com/showthread.php?t=$threadinfo[threadid]<if condition="$pagenumber>1">&page=$pagenumber</if>" /> 

    Notes
    I installed a fresh vBulletin 3.8 to my localhost and tested this mod. It should work just fine unless your vBulletin is highly modified. If you get validation errors, I believe you can fix them by looking at the examples (comments).


    Does it work?


    1. Open a thread from your forum.
    2. Replace the "showthread.php" with "amp.php" in the address bar, hit enter.
    3. Add "#development=1" at the end of the URL and refresh the page.
    4. Open Chrome DevTools, check the console log, it should say "AMP validation successful."





    Original Source: Integration with vBulletin - Accelerated Mobile Pages for vBulletin
    Eklenen Dosyalar Eklenen Dosyalar
    vBulletin is perfect board system.

Konu Bilgileri

Bu Konuya Gözatan Kullanıcılar

Şu anda 1 kullanıcı bu konuyu görüntülüyor. (0 kayıtlı ve 1 misafir)

Benzer Konular

  1. vBulletin Mobile Suite 1.13 Duyuruldu
    Konu Sahibi WeBMasteR Forum vBulletin
    Cevap: 0
    Son Mesaj : 10.Aralık.2016, 09:22
  2. Ücretsiz vBulletin Desteği- vBulletin Hizmeti
    Konu Sahibi Sir.Vanity Forum vBulletin
    Cevap: 1
    Son Mesaj : 11.Temmuz.2015, 19:55
  3. VBulletin Kısayolları
    Konu Sahibi kazanova21641 Forum vBulletin
    Cevap: 0
    Son Mesaj : 14.Ekim.2014, 16:35
  4. vBulletin Kurulumu
    Konu Sahibi WeBMasteR Forum vBulletin
    Cevap: 0
    Son Mesaj : 01.Ağustos.2014, 12:59
  5. vBulletin RSS Açmak
    Konu Sahibi WeBMasteR Forum vBulletin
    Cevap: 0
    Son Mesaj : 25.Mayıs.2014, 15:43

Yetkileriniz

  • Konu Acma Yetkiniz Yok
  • Cevap Yazma Yetkiniz Yok
  • Eklenti Yükleme Yetkiniz Yok
  • Mesajınızı Değiştirme Yetkiniz Yok
  •  
Linux Hosting
Yasal Bildirim
Sitemizde paylaşım yapan tüm üyeler T.C.K 20. Madde ve 5651 Sayılı Kanun'un 4. maddesinin 2. fıkrasına göre kendi konu ve mesajlarından sorumludur. Webmaster.bbs.tr hakkında yapılacak olan hukuksal ve diğer şikayetler için iletişim bölümünden iletişime geçilmesi halinde site yönetimi tarafından gereken işlemler yapılacak ve ilgili kişilere/kurumlara/vekillerine bilgi verilecektir.
Sosyal Medya