Forum Replies Created

Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    It’s been a month and none of thee issues reported seem to have been solved. I have been looking into it myself and with a small change to one of the plugin files, I could make it work with a fallback to index.php. Still, I can’t figure out why it only works on posts and not on pages (which seems to be the difference right now). Also, the code where I made the change does not get hit on pages. I might continue out of curiosity and to increase my own understanding of WordPress, but for now, I will reduce my rating to 2 stars and report it as broken.

    Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    With a single.php added to the theme (which simply includes index.php), no error occurs, but instead there is a message: “Post not found.” instead of the regular content. Again, debugging is the only option to find out what goes wrong.

    On closer inspection, it is clear that the single.php template is only being used because the post has errors, which might be due to the fact that the site is local and the keys won’t work.

    While debugging, it seems the error is that the comment has triggered the spam filter. This would indicate that the keys do work, although the site is local (?).

    Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    I debugged the code and this is what happens in this particular case:
    There is no single.php template in the theme, while mollom relies on its presence.

    Mollom uses the function get_single_template(), while I do not have a single template. It is a very simple theme, with only an index.php.

    I do have another WordPress blog though, that should have a single.php template and that blog also shows a WSOD when submitting a comment. I should debug that one too, to find out what’s going on. For now, I suppose re-using my index.php in single.php should fix the issue I’m seeing.

    Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    It probably had to do with the other issue I reported. They are both about inserting events using the backend. If a start date other then today is supplied, no event is inserted in the database. Also, if all fields are left blank, there is no feedback that we should insert a title, but I have no installation currently and if you say it all works fine in the backend as well as on the frontend, then I guess everything is fine then.

    Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    At the time, I tried this in WordPress 3.04 and probably 3.1 with the then latest version of your plugin. Note that I tried so save events in the backend, not in the community end. I haven’t currently installed the plugin, because it didn’t work at all.

    Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    I have refactored your plugin code to allow for separate retrieval of the popular posts as an array and fixed the two bugs mentioned above.

    Do you have an repository or e-mail where I can post the altered plugin so that you can use it if you like?

    Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    The same applies to:

    if ( $ns_options['credit'] !== 'false' ) {
    		$popular .= "<li style='opacity:0.4;filter:alpha(opacity=40);'><a href='https://thisismyurl.com/downloads/wordpress/plugins/easy-popular-posts/?source=" . urlencode(get_bloginfo('url')) . "' style='opacity:0.4;filter:alpha(opacity=40);' target='_blank'>Easy Popular Posts by Christopher Ross</a></li>";
    	}

    Thread Starter Bart McLeod

    (@mcleodspacewebnl)

    Well, I looked into the code and found why it does not work.

    if ( $ns_options['show'] ) {
    		echo $popular;
    	} else {
    		return $popular;
    	}

    The above bit of code should obviously be:

    if ( $ns_options['show'] !== 'false') {
    		echo $popular;
    	} else {
    		return $popular;
    	}

    Since all the options are extracted as strings, string ‘false’ converts to boolean true if you just check if it is set. Instead, you should do a check for the exact string ‘false’.

    And then, after changing the code in this way, my snippet will still not work, because the result is not an array. This is not wrong by the way.

    Why would I like to change the behavior? [maybe it already exists, I have to dig in further]. Well, I would like the first of the popular posts to show the excerpt and the title only for the rest of them.

    Bart McLeod

    (@mcleodspacewebnl)

    Sorry about posting off-topic

    Bart McLeod

    (@mcleodspacewebnl)

    Sorry, this was off-topic. I started a new topic. Moderator, please remove my last two posts here.

    Bart McLeod

    (@mcleodspacewebnl)

    I think it is pretty useless to have everyone hack your code to make your plugin really useful.

    Of course, with WordPress being a community and sharing tool, logged in users actions may matter as much or even more than non-logged in user actions.

    So which visits to track for popularity should be an option in the admin panel. I am willing to aid in making it optional that way.

Viewing 11 replies - 16 through 26 (of 26 total)