Skip navigation
Sidebar -

Advanced search options →

Welcome

Welcome to CEMB forum.
Please login or register. Did you miss your activation email?

Donations

Help keep the Forum going!
Click on Kitty to donate:

Kitty is lost

Recent Posts


Lights on the way
by akay
Today at 09:49 AM

Do humans have needed kno...
Yesterday at 01:06 PM

Qur'anic studies today
by zeca
June 08, 2025, 01:38 PM

What music are you listen...
by zeca
June 07, 2025, 08:56 PM

New Britain
June 06, 2025, 10:16 AM

Muslim grooming gangs sti...
June 02, 2025, 09:31 PM

ماذا يحدث هذه الايام؟؟؟.
by akay
June 02, 2025, 10:25 AM

What happens in these day...
June 02, 2025, 09:27 AM

What's happened to the fo...
June 01, 2025, 10:43 AM

Gaza assault
May 24, 2025, 11:55 AM

الحبيب من يشبه اكثر؟؟؟
by akay
May 19, 2025, 12:00 PM

Marcion and the introduct...
by zeca
May 17, 2025, 09:44 PM

Theme Changer

 Topic: New Feature: Automatic quote splitting

 (Read 28803 times)
  • Previous page 1 23 Next page « Previous thread | Next thread »
  • Re: New Feature: Automatic quote splitting
     Reply #30 - February 16, 2010, 06:54 PM

    I think the this.nextSibling part is what is causing it to fail, if you instead give the div containing the help an id, and do: document.getElementById('help').display = 'block'; , that should fix it.

    The script is working correctly. I tested it in IE6, but for some reason the div doesn't get rendered.

    I'll try your suggestion as well.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #31 - February 16, 2010, 07:03 PM

    I'm fairly certain IE handles nextSibling differently or doesn't support them
  • Re: New Feature: Automatic quote splitting
     Reply #32 - February 16, 2010, 07:08 PM

    I'm fairly certain IE handles nextSibling differently or doesn't support them

    The 'nextSibling' property is supported by all browsers in the same way, afaik. By the way, the solution is to use "div_tag.style.display= 'block'". Now at least the help section is also displayed in IE (v6).

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #33 - February 16, 2010, 07:11 PM

    Oh, if you want to help debugging the feature in IE, here is the piece of code it fails to interpret:
    function COEM_enableSplitting(checkbox)
    {
      var form = document.getElementById("postmodify");
      var textarea = form.elements.namedItem("message");
    //   (textarea[checkbox.checked ? 'addEventListener' : 'removeEventListener']
    //      ('keyup', COEM_splitTags, false));
      var listener = checkbox.checked ? textarea.addEventListener : textarea.removeEventListener;
      listener('keyup', COEM_splitTags, false);
    } // <- At this line it says: "Object expected"

    All the functions are at the end of this file:
    http://www.councilofexmuslims.com/Themes/default/script.js

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #34 - February 16, 2010, 07:12 PM

    That's weird, so document.getElementById() didn't work in IE? Have you worked out what the issue is then?
  • Re: New Feature: Automatic quote splitting
     Reply #35 - February 16, 2010, 07:16 PM

    Oh, if you want to help debugging the feature in IE, here is the piece of code it fails to interpret:
    function COEM_enableSplitting(checkbox)
    {
      var form = document.getElementById("postmodify");
      var textarea = form.elements.namedItem("message");
    //   (textarea[checkbox.checked ? 'addEventListener' : 'removeEventListener']
    //      ('keyup', COEM_splitTags, false));
      var listener = checkbox.checked ? textarea.addEventListener : textarea.removeEventListener;
      listener('keyup', COEM_splitTags, false);
    } // <- At this line it says: "Object expected"

    All the functions are at the end of this file:
    http://www.councilofexmuslims.com/Themes/default/script.js

    Why not use Jquery to set the events? It takes care of the cross browser issues for you. The code above could be rewritten as:

    $("#checkbox_id_here").change(COEM_splitTags);
    function COEM_splitTags()
    {
        if (! this.checked) // checkbox wasn't checked
           return;
       // Code for splitting the quotes here
    }
  • Re: New Feature: Automatic quote splitting
     Reply #36 - February 16, 2010, 07:20 PM

    That's weird, so document.getElementById() didn't work in IE? Have you worked out what the issue is then?

    Of course, that works, too.

    Why not use Jquery to set the events? It takes care of the cross browser issues for you. The code above could be rewritten as:
    ...

    Well, I certainly love jQuery, but it's not used in the forum software. I could easily add it, but I don't know if I should. It's not necessary at the moment.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #37 - February 16, 2010, 07:23 PM

    IMO you should add Jquery, its just 30-40 KB and once its added you'll find a lot of uses for it Wink.

    If the bandwidth is the issue its also hosted on google code, you could link to the following file:
    http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js

    And google would host it for you

    Edit: Its actually only 23 KB!
  • Re: New Feature: Automatic quote splitting
     Reply #38 - February 16, 2010, 07:36 PM

    Yes, I know I can hotlink to the file on Google's server. But it's only 23KB? Last time I checked it was 68KB. Well, maybe I'll add it, don't know yet. Tongue

    By the way, I know why the code is failing in IE6. It doesn't support addEventListener! lol!

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #39 - February 16, 2010, 07:47 PM

    So I used attachEvent instead of addEventListener on IE6. The splitting feature still doesn't work, and I give up trying to debug it. I should be testing on IE7 or IE8 anyway, but there's no way to make those versions run on Linux atm.

    So I don't really give a crap if it doesn't work in IE. Just install a proper browser and don't annoy us developers.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #40 - February 17, 2010, 08:54 AM

    That's pretty cool. Now, is there hope that you might come up with a feature that would allow us to multiquote? (the quote within the quote thing)

    He's no friend to the friendless
    And he's the mother of grief
    There's only sorrow for tomorrow
    Surely life is too brief
  • Re: New Feature: Automatic quote splitting
     Reply #41 - February 17, 2010, 03:30 PM

    That's pretty cool. Now, is there hope that you might come up with a feature that would allow us to multiquote? (the quote within the quote thing)

    You can already quote multiple times by clicking on a "Quote this post" link on the page where you write your reply. Or do you mean quoting nested quotes? You have to create those manually. The forum software filters out the inner levels, when you quote a post. I think the reason is to avoid getting quotes that grow too much.

    Hope that helps.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #42 - February 17, 2010, 03:31 PM

    Its working in IE8 now, have you tweaked something or is it because I added the Chrome accelerator?

    My Book     news002       
    My Blog  pccoffee
  • Re: New Feature: Automatic quote splitting
     Reply #43 - February 17, 2010, 03:34 PM

    You can already quote multiple times by clicking on a "Quote this post" link on the page where you write your reply. Or do you mean quoting nested quotes? You have to create those manually. The forum software filters out the inner levels, when you quote a post. I think the reason is to avoid getting quotes that grow too much.

    Hope that helps.


    It does. Thanks  Afro

    He's no friend to the friendless
    And he's the mother of grief
    There's only sorrow for tomorrow
    Surely life is too brief
  • Re: New Feature: Automatic quote splitting
     Reply #44 - February 17, 2010, 03:42 PM

    Its working in IE8 now, have you tweaked something or is it because I added the Chrome accelerator?

    Changed nothing. You have effectively replaced IE's rendering engine with Chrome's engine. "Chrome accelerator" is marketing language. lol

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #45 - February 17, 2010, 08:53 PM

    IMO you should add Jquery, its just 30-40 KB and once its added you'll find a lot of uses for it Wink.


    If the bandwidth is the issue its also hosted on google code, you could link to the following file:
    http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js


    And google would host it for you


    Edit: Its actually only 23 KB!

    Nice. Fuck IE.  bunny

    Devious, treacherous, murderous, neanderthal, sub-human of the West. bunny
  • Re: New Feature: Automatic quote splitting
     Reply #46 - February 17, 2010, 09:16 PM

    Edit: Its actually only 23 KB!

    Where do you get that number from? Version 1.4.1 of jquery.mini.js is 69.2KB big.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #47 - February 17, 2010, 09:22 PM

    Doesn't matter. We have stack of storage space on the server anyway. Who cares about 70kb when just one of the Sources files for the forum software is 150kb?

    I have thought about loading either jQuery or MooTools. If you want to try it that's fine with me.

    Anyway I did think of one thing with this quote splitting. At the moment you have to use keyboard and mouse to split quotes (given that most people will position the cursor by using the mouse). It would be cool if the whole process was mousable.

    Devious, treacherous, murderous, neanderthal, sub-human of the West. bunny
  • Re: New Feature: Automatic quote splitting
     Reply #48 - February 17, 2010, 09:32 PM

    Doesn't matter. We have stack of storage space on the server anyway. Who cares about 70kb when just one of the Sources files for the forum software is 150kb?

    I have thought about loading either jQuery or MooTools. If you want to try it that's fine with me.

    I'm not familiar with MooTools. JQuery is more advanced I believe, it certainly receives a lot of attention from developers all over the world. If we decided to use jQuery, we should definitely let Google host the file for us. Tongue

    Anyway I did think of one thing with this quote splitting. At the moment you have to use keyboard and mouse to split quotes (given that most people will position the cursor by using the mouse). It would be cool if the whole process was mousable.

    Yeah, maybe that's possible. Perhaps assign the function to Ctrl + Left Mouse Button?
    I will enable the checkbox for the quote splitting feature by default. Tell me if you think that's a bad idea. I think it shouldn't affect anybody negatively.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #49 - February 17, 2010, 09:34 PM

    Where do you get that number from? Version 1.4.1 of jquery.mini.js is 69.2KB big.

    Actually the http://jquery.com/ site says 23 KB but if you download its larger.  Huh?
  • Re: New Feature: Automatic quote splitting
     Reply #50 - February 17, 2010, 09:39 PM

    I recommend jquery over mootools, jquery is a hell of a lot better
  • Re: New Feature: Automatic quote splitting
     Reply #51 - February 17, 2010, 09:48 PM

    Actually the http://jquery.com/ site says 23 KB but if you download its larger.  Huh?


    Ah, it says: "Production (23KB, Minified and Gzipped)" That means the server serves the jQuery code as a zipped file to you, which your browser can unzip before loading it as JavaScript code. Good thing! (Some browsers may not support gzipped content. The usual suspect would be: IE)

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #52 - February 17, 2010, 09:53 PM

    So how does the zipped thing work, do you still name the file as .js or a .zip?
  • Re: New Feature: Automatic quote splitting
     Reply #53 - February 17, 2010, 09:56 PM

    The only problem with using jQuery on this forum, is that I don't know where I could insert the <script> tag so that all Themes will load jQuery.

    I thought I could add it before "/script.js?fin11", but searching the Themes folder returns these results:
    ./default/index.template.php:   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>       
    ./default/Help.template.php:            <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js"></script>
    ./default/Post.template.php:            <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js"></script>
    ./default/Post.template.php:            <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js"></script>
    ./OutlineOmega_TP/index.template.php:   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
    ./TP97_DefaultMC_fin11/index.template.php:      <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
    ./Devils_Rejects_1/index.template.php:  <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?rc2p"></script>
    ./MysticMulti_983/index.template.php:   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
    ./Blueace_tp/index.template.php:        <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>

    ;(

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #54 - February 17, 2010, 10:00 PM

    I'm not keen on relying on an outside source for anything this site runs on. Not unless it is only for trivial functions that wouldn't matter if they were disabled.

    And I agree about the relative merits compared to Mootools. Mootools used to be big but seems to have slid backwards a bit.

    Devious, treacherous, murderous, neanderthal, sub-human of the West. bunny
  • Re: New Feature: Automatic quote splitting
     Reply #55 - February 17, 2010, 10:02 PM

    Aziz, themes that run a js library usually have it added to each one individually. AFAIK there is no way of doing it globally but I can find out.

    ETA: I mean the call for the file, that is. Goes in the head section of index.template.php.

    Devious, treacherous, murderous, neanderthal, sub-human of the West. bunny
  • Re: New Feature: Automatic quote splitting
     Reply #56 - February 17, 2010, 10:06 PM

    I'm not keen on relying on an outside source for anything this site runs on. Not unless it is only for trivial functions that wouldn't matter if they were disabled.

    I think in this case there's nothing to worry about. Google is obviously okay with web masters using their bandwidth, and my guess is that thousands of web sites already do that. It would be extremely damaging to this project and the image of Google if it was found out that it sneaks in unwanted code. Thousands of eyes are focused on jQuery, so I think we're safe.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #57 - February 17, 2010, 10:09 PM

    Ops, I don't know why I'm talking about Google like it's the primary developer or host of jQuery. I'm probably confused. Tongue

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Re: New Feature: Automatic quote splitting
     Reply #58 - February 17, 2010, 10:12 PM

    I'm not worried about being hacked via the file as I think we have more chance of the servers being hit by a meteor. I'd just rather have the site self-reliant as much as possible. We are already serving a stack more kb to all browsers anyway so I'm not sure an extra 23 is going to make any difference.

    As an example: just my avatar and the userbar in my sig are about 23 kb combined. It's aint gonna bugger our bandwidth, mate.  Afro

    Devious, treacherous, murderous, neanderthal, sub-human of the West. bunny
  • Re: New Feature: Automatic quote splitting
     Reply #59 - February 17, 2010, 10:19 PM

    Okay, but I think that gzipping isn't enabled on this server. JQuery must be loaded as quickly as possible, to be ready for all the other code that is using it. I've decided to use the external gzipped source for now. The default template has the code now, other Themes may follow.

    German ex-Muslim forumMy YouTubeList of Ex-Muslims
    Wikis: en de fr ar tr
    CEMB-Chat
    I'm on an indefinite break...
  • Previous page 1 23 Next page « Previous thread | Next thread »