Re: Extensions by Rich Pedley

I wish the vote down option was removable. my members don't like it. it causes upset, "hey who voted me down!"

Re: Extensions by Rich Pedley

I could add in a class so that it could be hidden via css (or is there one already?)

my mind is on a permanent tangent
byUsers forum

Re: Extensions by Rich Pedley

esupergood wrote:

I wish the vote down option was removable. my members don't like it. it causes upset, "hey who voted me down!"

Is that for the eKarma extension, If so that was my point.  And so the fact that with both options users can just play around and the karma be it + or - would mean nothing.

If they was the option to only thank members then i believe it would be used only really when thanks is deserved.

But still with the option for mods or just admins maybe to edit karma via profile or whatever.

I think hiding it in the css may not work as all you would need to do so edit the url for adding karma and replace where needed we remove or whatever.

Re: Extensions by Rich Pedley

all I can say is I'll have a think - and if I ever update the extension I'll look into it.

my mind is on a permanent tangent
byUsers forum

Re: Extensions by Rich Pedley

hey man, awesome stuff, i have some questions for you.
I'm using Forum Fixes and Images Beta, eKarma, Private Messaging, and whole bunch of other extensions. (http://www.theseabass.com/forum/)
anyways, how might i go about adding an image next to Private messages, and also add a + image and a - image to eKarma?

Re: Extensions by Rich Pedley

view the source of the page and look for a class name, and style against that.

my mind is on a permanent tangent
byUsers forum

82 (edited by Ruzzz 2009-12-15 01:16)

Re: Extensions by Rich Pedley

About Gravatar:

  • dont use fn_generate_avatar_markup_end, use fn_generate_avatar_markup_start, otherwise gravatar does not work if file of avatar is loaded

  • use if ($forum_config['o_gravatar'] == '1'  && $avatar_markup=='') before $gresult=$forum_db->query

  • you are going to support caching?

83 (edited by wtfworks 2012-11-22 16:44)

Re: Extensions by Rich Pedley

Hello Rich,
sorry to bump this. because im still using 1.3. so i made a change about bbcode_extended.
i making this because the spoiler doesnt work. default installed just hiding a content below the 'spoiler' bar.
so this is my mood. this mod making animate to spoiler. and must have jquery extension. im using fancy_jquery.
( *please dont ask about coding. im just making a little mod and put some javascript from jquery. basicly im not coder, im just GUI designer smile )

At manifest.xml just adding spoiler.js below .css

<?xml version="1.0" encoding="utf-8"?>
    <extension engine="1.0">
    <id>bbcode_extended</id>
    <title>BBCode Extended</title>
    <version>0.1</version>
    <description>This extension adds extra BBCode tags.</description>
    <author>Rich Pedley</author>
    <minversion>1.3</minversion>
    <maxtestedon>1.3.4</maxtestedon>
    <hooks>
        <hook id="he_start"><![CDATA[
            // Include language
            if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'.php'))
                require $ext_info['path'].'/lang/'.$forum_user['language'].'.php';
            else
                require $ext_info['path'].'/lang/English.php';
        ]]></hook>
        <hook id="ps_do_bbcode_replace"><![CDATA[
            // Include language
            if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'.php'))
                require $ext_info['path'].'/lang/'.$forum_user['language'].'.php';
            else
                require $ext_info['path'].'/lang/English.php';
            //strikethrough
            $pattern[] = '#\[s\](.*?)\[/s\]#s';
            $replace[] = '<del>$1</del>';
            //spoiler
            $pattern[] = '#\[spoiler\](.*?)\[/spoiler\]#s';
            $replace[] = '</p><div class="spoiler"><strong>'.$lang_bbcode_extended['Spoiler'].'</strong><div class="spoilContent">$1</div></div><p>';
        ]]></hook>
        <hook id="ps_preparse_tags_start"><![CDATA[
            $tags_block[]='spoiler';
        ]]></hook>
        <hook id="ps_preparse_bbcode_start"><![CDATA[
            //strike
            $tags[] = 's';
            
            $tags_opened[] = 's';
            $tags_closed[] = 's';
            $tags_inline[] = 's';
            
            $tags_limit_bbcode['*'][] = 's';
            $tags_limit_bbcode['url'][] = 's';
            $tags_limit_bbcode['email'][] = 's';
            
            $tags_fix[] = 's';
            //spoiler
            $tags[] = 'spoiler';
            $tags_opened[] = 'spoiler';
            $tags_closed[] = 'spoiler';
            
            $tags_fix[] = 'spoiler';            
        ]]></hook>
        <hook id="he_new_bbcode_text_style"><![CDATA[
            ?>
            <li>
                <code>[s]<?php echo $lang_bbcode_extended['Deleted text'] ?>[/s]</code> <span><?php echo $lang_help['produces'] ?></span>
                <samp><del><?php echo $lang_bbcode_extended['Deleted text'] ?></del></samp>
            </li>
            <li>
                <code>[spoiler]<?php echo $lang_bbcode_extended['Spoiler'] ?>[/spoiler]</code> <span><?php echo $lang_help['produces'] ?></span>
                <samp><div class="spoiler"><?php echo $lang_bbcode_extended['Spoiler'] ?></div></samp>
            </li>
            <?php
        ]]></hook>
        <hook id="hd_head">
            <![CDATA[
            $forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
            $forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';
            ]]>
        </hook>
        <hook id="hd_viewtopic_head">
            <![CDATA[
                $forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
                $forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';
            ]]>
        </hook>
        <hook id="hd_post_head">
            <![CDATA[
                $forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
                            $forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';

            ]]>
        </hook>
        <hook id="hd_profile-signature_head">
            <![CDATA[
                $forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
                            $forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';

            ]]>
        </hook>
        <hook id="hd_postedit_head">
            <![CDATA[
                $forum_head[] = '<link rel="stylesheet" type="text/css" media="screen" href="'.$ext_info['url'].'/bbcode_extended.css" />';
                            $forum_head[] = '<script type="text/javascript" src="'.$ext_info['url'].'/spoiler.js"></script>';

            ]]>
        </hook>
    </hooks>
</extension>

CSS mod (bbcode_extended.css)

.spoiler>strong {
    color:#fff;
    background:#333;
    padding:10px;
    border-radius:4px;
    display:block;
    
}
div.spoiler{
    color:#333;
    background:#e5e5e5;
    cursor: pointer;
    -webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
padding:10px;
border-radius:6px;
}
.spoilContent {
    display:none;
}

and here's spoiler.js

// JavaScript Document
$(document).ready(function(){
    $.each($('.spoiler'), function(){
        $(this).click(function(){
            $(this).find('.spoilContent').toggle('normal', 'linear');
        });
    });
});