Not logged in. · Lost password · Registration disabled

All posts by gw (5)

topic: Keeps resetting Categories  in the forum: Questions / Fragen
gw #1
Member since Jul 2009 · 5 posts
Group memberships: Mitglieder
Show profile · Link to this post
Subject: Solved!
I managed to solve the issue with the JS-Logic of the checkboxes.

http://pn.strübe.de/forum.php?req=thread&postid=1978&…
topic: Bugfix category-selector (Sometimes the category-selector (javascript) does not work, this patch fixes it.)  in the forum: Files & Mods / Datein & Mods
gw #2
Member since Jul 2009 · 5 posts
Group memberships: Mitglieder
Show profile · Link to this post
Subject: Bugfix category-selector
Issue
Under some circumstances, the category selector selects more categories than he should.

Example

[Image: http://www.gwegner.de/wp-content/images/forum/pn.png]

In this case for me clicking on the topmost checkbox "News" as well selects the whole subtree on "Störungen".

I managed to debug this one and will share the solution with you - and hope, the author will incorporate it into the next version.

Background

there is a somewhat "interesting" javascript logic turning the checkboxes on and off.

[Image: http://www.gwegner.de/wp-content/images/forum/pn_error.png]

It checks for the category Id and assumes, the category has ended, when the substring cat.0.1 changes.
In this case however (see example) this substring is not changing, although the parent categroy does. The reason ist, that the ID of next category "16" begins with "1". That's the problem when using strings for numbers...

Solution

Okay and here we go with the solution:

Exchange the contents of your pncats.js file with the following code:

var post_notification_running = false;
var post_notification_box = new Array();

function post_notification_cats_init(){
    var boxes =  document.getElementsByTagName("input");
    var tocheck = "";
    var i;
    if(post_notification_running) return;
    post_notification_running = true;
   
   
    for(i = 0; i < boxes.length; i++){
        if(boxes[i].id.substr(0, 4)== "cat."){
            if(boxes[i].disabled == true){
                boxes[i].checked = post_notification_box[i];
                boxes[i].disabled = false;   
            }
        }
    }
   
   
    for(i = 0; i < boxes.length; i++){
        if(boxes[i].id.substr(0, 4)== "cat."){
            if(tocheck != ""){
                // hack by gwegner.de
                if((boxes[i].id.substr(0, tocheck.length) == tocheck)
                  && (boxes[i].id.length > tocheck.length)
                  && (boxes[i].id.substr(tocheck.length, 1) == "."))
                // end of hack 
                {
                    post_notification_box[i]  = boxes[i].checked;
                    boxes[i].checked = true;
                    boxes[i].disabled = true;
                } else {
                    tocheck = "";
                }
            }
           
            if(tocheck == ""){ //There is no string
                if(boxes[i].checked == true){
                    tocheck = boxes[i].id; //From now on this is the new String
                }
            }
        }
    }
    post_notification_running = false;
}


function post_notification_cats_change(){

}

regards
gw
topic: Keeps resetting Categories  in the forum: Questions / Fragen
gw #3
Member since Jul 2009 · 5 posts
Group memberships: Mitglieder
Show profile · Link to this post
In reply to post ID 1882
Same Problem here. Annoying.
Furthermore the JS-Logic to select / unselect categories with ist subcategories is not working correctly.

[Image: http://www.gwegner.de/wp-content/images/forum/pn.png]

Clicking on the topmost checkbox "News" as well selects the whole subtree on "Störungen".

Could you please double check this and tell me, if a fix is possible? Thank you!

Regards,
gw
topic: Auto Subscribe for new registered user not working  in the forum: Questions / Fragen
gw #4
Member since Jul 2009 · 5 posts
Group memberships: Mitglieder
Show profile · Link to this post
In reply to post ID 1934
Same Problem here, it would be nice to get it fixed, thank you for the good work!
topic: gwegner.de - Fotografie, Reisen und mehr... (Ihre wöchentliche Reiseerzählung aus Südamerika!)  in the forum: Blogs using PN / Blogs die PN benutzen
gw #5
Member since Jul 2009 · 5 posts
Group memberships: Mitglieder
Show profile · Link to this post
Subject: gwegner.de - Fotografie, Reisen und mehr...
Ihre wöchentliche Reiseerzählung aus Südamerika: Brasilien, Venezuela, und weitere Ziele werden als Multimedia Reisebericht in wöchentlichen Fortsetzungen mit vielen hochauflösenden Fotos und HD Videos vorgestellt.

http://www.gwegner.de

Nach immer wieder auftretenden Problemen mit feedburner und ständigem Ärger über die dort nicht vorhandenen Customizing-Möglichkeiten, ist Post-Notification DIE geniale und leserfreundliche Lösung!

Vielen Dank für das tolle Plugin!

G. Wegner
Close Smaller – Larger + Reply to this post:
Special characters:
Special queries
Go to forum