MyBBDepo - Türkiyenin MyBB Deposu Forumuna Hoşgeldiniz
Eğer sitemize yaptığınız ilk ziyaretiniz ise, lütfen öncelikle Forum Kurallarını okuyunuz. Forumumuzda bilgi alışverişinde bulunabilmeniz için Kayıt olmalısınız. Üye olmayanlar forumumuzdan yararlanamazlar.
Eğer zaten kayıtlı kullanıcı iseniz, lütfen kullanıcı adınız ve şifreniz ile, Giriş yapınız. (Sitemize üyelik ücretsizdir).
istersensor avatar
Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5

Derecelendirme: 0/5 - 0 oy

dipnot ( footnote ) mybb


Sponsor Reklam

Çevrimdışı istersensor
 Tarih: 09-02-2015, Saat:16:01
#1
arkadaşlar foruma eklemek üzere dipnot eklentisi arıyorum
bende bir php var ama ekleyemiyorum
Kod:
<?php
/**
* YourCode default module
*
* @category   MyBB Plugins
* @package    YourCode
* @subpackage Addon Modules
* @name       Footnotes
* @author     Mark Vincent <[email protected]>
* @copyright  2012-2014 Mark Vincent
* @license    http://opensource.org/licenses/gpl-license.php GNU Public License
* @link       https://github.com/WildcardSearch/YourCode
* @since      1.1
* @example
*
* This is an example[note]a rather pointless example at that[/note] sentence.
*/
/**
* yc_footnotes_info()
*
* returns the module info
*
* @return array the module info
*/
function yc_footnotes_info()
{
    return array(
        "title" => 'Footnotes',
        "description" => 'allows users to append footnotes to expound upon certain portions of their post',
        "version" => '1.0',
        "compatibility"    => "16*, 18*"
    );
}
/*
* yc_footnotes_parse_message()
*
* parses the footnotes BB Code
*
* @param  string the message
* @return string the altered message
*/
function yc_footnotes_parse_message($message)
{
    global $post;
    preg_match_all("#\[note\](.*?)\[/note\]#i", $message, $matches, PREG_SET_ORDER);
    $note_num = 1;
    $addendum = '';
    foreach((array) $matches as $match)
    {
        $id = "footnote_{$post['pid']}_{$note_num}";
        // replace the note with a link
        $replacement = <<<EOF
<sup><a href="#{$id}" style="color: #1AB21A;">[{$note_num}]</a></sup>
EOF;
        $message = str_replace($match[0], $replacement, $message);
        /*
         * and add the note content into the footer of the post
         * after of course creating the footer (and synthesizing the need
         * for a footer in the first place) and add an achor to snap to
         */
        $addendum .= <<<EOF
    <li style="padding-bottom: 3px;"><a id="{$id}"></a>{$match[1]}</li>
EOF;
        // let footnotes order themselves
        ++$note_num;
    }
    if($addendum)
    {
        $message .= <<<EOF
<hr style="width: 25%;"/>
<span class="smalltext" style="font-weight: bold;">Footnotes:</span>
<ol class="smalltext">{$addendum}
</ol>
EOF;
    }
    return $message;
}
?>

adı footnotes.php
yardımcı olursanız sevinirim...
Cevapla
Bunu Beğenenler:
Sponsor Reklam
Sponsor Reklam Sponsor Reklam

Çevrimdışı poyraz
 Tarih: 10-02-2015, Saat:20:00
(Son Düzenleme: 11-09-2015, Saat:16:35, Düzenleyen: poyraz.)
#2
?????
Cevapla
Bunu Beğenenler: S.G

Çevrimdışı istersensor
 Tarih: 21-02-2015, Saat:20:45
#3
peki nasıl kullanacağım ?
Cevapla
Bunu Beğenenler:

 


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  [1.8] MyBB 1.8.x Responsive (Mobil) Uyumlu Forum istatistikleri arhavili 0 1,163 25-03-2020, Saat:19:40
Son Yorum: arhavili
  MyBB 1.8.X Google Adanse Reklamı Ekleme AwpSlayer 0 3,112 12-10-2019, Saat:13:42
Son Yorum: AwpSlayer
  Mybb 1.8 İçin Postbit Winsoft 7 5,631 07-10-2019, Saat:10:51
Son Yorum: xfdestek
  [1.8] Mybb 1.8.7 link Gizleme Eklentisi Theyamak 3 3,472 01-10-2019, Saat:10:22
Son Yorum: AwpSlayer
Araç - Bakım MyBB 1.8x Postbit İstek TheAnoniM 2 2,545 07-04-2017, Saat:17:10
Son Yorum: VenomBoss



Konuyu Okuyanlar: 1 Ziyaretçi

istanbul escort - mecidiyeköy escort - şişli escort - ataköy escort - taksim escort - escort mecidiyeköy

sex hikaye - porno izle - türk ifşa - mecidiyeköy escort - seks hikaye - türk porno - escort bayan