Recent Topics

1 Jul 15, 2006 12:18    

I'm counting this as a bug, as this is ridiculous, when i post a comment on my blog, i need to go back into the backoffice and then publish it, even though i posted it in the first place....

2 Jul 15, 2006 13:02

I thought it was a setting I needed to do somewhere, but apparently not. It bugs me too, but I asked instead of calling it a bug because I didn't think of it as a bug. Hmmm... Things that bug me are bugs. I like that! Anyway the basic antispam plugin has potential to allow it, but yeah: it seems very obvious that comments from registered bloggers do not need to be moderated.

Sounds like a hack is in order. I'd be a lot happier hacking than trying to create plugins. At least until a bunch of other people make plugins that do stuff I can hack into something else ;)

3 Jul 15, 2006 13:16

EdB wrote:

Sounds like a hack is in order.

Sounds like you have a job to do ;) - Better start getting high ;) ( Yeh i read your programming prefs :) still haven't had a chance to reply yet :'( )

EdB wrote:

I'd be a lot happier hacking than trying to create plugins. At least until a bunch of other people make plugins that do stuff I can hack into something else ;)

Maybe you should take up Plugins ;), Or make a Hack Plugin somehow.... Oooooo i know what you can hack up!!!! All my feature requests ;)

EdB wrote:

Things that bug me are bugs.

- New forum motto right there ;)

5 Jul 15, 2006 14:05

	/**
	 * Handle max_number_of_links_feedback setting.
	 *
	 * Try to detect as many links as possible
	 */
	function GetSpamKarmaForComment( & $params )
	{
		global $current_User;
		
		if( isset( $current_User ) ) return -100;
	}

I'll just stick that straight into the basic antispam plugin. - So Cheers!

I don't see the point of having a enable there, but probz only a 1 minute copy and paste job aye?

Anyway this is cool, i can work on another hack/plugin i've wanted to for some time.

So +100 to the Spam Karma will treat it as spam?

Edit: shouldn't it have a else return 0; ? :-/

6 Jul 15, 2006 14:14

Yeah, it was just a quick copy paste ;)

The problem with altering the basic antispam is that future upgrades will require rehacking.

I'll redo the code to work of user levels, which should give it a tad more flexability.

returning nothing is the same as returning zero surely? ;)

¥

7 Jul 15, 2006 14:25

returning nothing is the same as returning zero surely?

I was brought up learning that returning nothing returns NULL, or the Address of the function..... - But seeing all (most of) the other events always return something, true or false, shouldn't this one be no different.

The problem with altering the basic antispam is that future upgrades will require rehacking.

That is why this is a Bug Fix ;) - And should be commited :>

A guy with too much time on his hands wrote:

I'll redo the code to work of user levels, which should give it a tad more flexability.

User levels is good idea, But also a thing where if they are a member of the blog automaticly post.

A guy with nearly no time on his hands wrote:

Anyway this is cool, i can work on another hack/plugin i've wanted to for some time.

I'll just get my idea out there, as you seem to be the man atm.

Heres the idea:
Anonymous users should NOT be aloud to attach their website in their comment, it should be a privellege to only registered users (or members).

So i say stick some javascript in the SkinBeginHtmlCode, that adds a event for the page load, finds the url comment text box, hides it (So bots still see it), so the user cannot see the url box, so therefor cannot post something inside it, so if there is something inside it then it was a bot!!!
Now have a check in this spam thing to find out if there was a url posted, and wether or not the user is registered or a member (whatever the admin decides).

I think it's a pretty sweet idea, i would do it myself, but you seem to be waving your hand whenever their is a challenge recently ;) So go for it :roll:

8 Jul 15, 2006 14:45

It's not a "bug fix" because it doesn't correct an error in the basic antispam plugin ;)

So i say stick some javascript in the SkinBeginHtmlCode

I'll always be reported as a spammer then, because I have javascript disabled unless a sites on my whitelist ;)

I'll fluff it out a tad and then repost it ;)

¥

9 Jul 15, 2006 14:47

Oh actually, don't know where i got javascript from, use a css style with the ID of the url textbox, and display:none; That will work always.

11 Jul 15, 2006 14:54

Oh and it's a bug fix becuase it fixes something that was bugging me. ;) - Well EdB agrees :P

Anyway, i don't see why these things arn't added into the basic antispam plugin anyway, as they are basic antispam things. Yeh don't really see the point in making another plugin for a such a small thing anyway, when they can just be commited to the basic antispam plugin...

And cheers for taking care of this.

12 Jul 15, 2006 15:27

It's a bug, but it's not a plugin bug. It's a core file that needs attention. Probably something in a folder named inc or misc, but any more than that and I'm lost.

13 Jul 15, 2006 15:29

I was with yah up to inc ....... then I got lost in sub folders :p

¥

14 Jul 15, 2006 16:37

Thats why you use a text searching program ;)

Or the technical docs, or just use the plugin fix ;)

But yeh, a plugin should not need to address this issue, it can be used to provide the other features, but the issue here is 'needing to publish your own comment'.

15 Jul 15, 2006 17:20

Scuse me while I go off-topic a bit...

balupton wrote:

Thats why you use a text searching program ;)

Do you know of any free (or reasonably inexpensive) tools that will search multiple files in multiple folders? I like the editor I use, but it doesn't do big-whammy searches like dreamweaver used to. It's too bad my PC with the "eternal demo" version of DW died :'( I really liked it when I could fire up DW and search the entire package for every occurance of foobar( or $current_User->, then do my hacking in htmlKIT. Now it's all hit or miss, and mostly miss. Ain't no way I'll pay that much money for something that served ONE purpose!

balupton wrote:

Or the technical docs

Do you mean the page I currently link to in my sig file? Unfortunately I haven't yet found the CVS side as helpful as I found the .9.2 side of that particular neighborhood.

16 Jul 15, 2006 17:26

Haha yeh, that would be the page ;)

Agent Ransack is what i use to use, now i just use dreamweaver...

But Agent Ransack is very good, it does regular expressions, line numbering, text previews, the whole lot.

If you search for 'Agent Ransack' in this forum, you will also find blueyed's preference along side my post of Agent Ransack.

So yeh.... [ Mind helping me over [url=http://forums.b2evolution.net/viewtopic.php?t=8412]here[/url] - i'm going crazy!!!! ]

17 Jul 15, 2006 19:25

if you're into command line tools, you could always install cygwin and use:
grep -i -r keyword *

18 Jul 15, 2006 19:28

--> Offtopic
Your 1st post and you say that... your a strange one ;)

Nah, I'm a gui and windows person, i think EdB is as well, but blueyed is linux, and yabba i have no clue.

But yeh to me there is only one time when command line is good, and thats when there is no need for a gui.
--> Offtopic

19 Jul 16, 2006 08:59

Ok, lets see if this does what you want ;)

Have a play with it and let me know

¥

*file removed*
Note: I've removed the file because I've updated the plugin to include settings for the various karma levels. The revised version will be posted on the plugins forum shortly

20 Jul 16, 2006 09:11

what is the point of having both of these instead of just the first one?

	function SkinBeginHtmlHead()
	{
		if( !$this->Settings->get( 'visitor_url' ) )
		{	// visitors cannot leave a web address
			echo '<style type="text/css">
			#o{display:none;}
			</style>';
		}
	}
	
	function DisplayCommentFormButton()
	{
		if( !$this->Settings->get( 'visitor_url' ) )
		{	// visitors cannot leave a web address
			//if javascript is enabled then remove the url portion of the form completely
			echo '<script type="text/javascript">
				document.getElementById( "o" ).parentNode.parentNode.style.display = "none";
				</script>';
		}
	}

But yeh, it seems to be what i'm looking for...

Although i hate these one char names that are being used all the time now, like s, for search. i use $s for sizeof($thearrayimabouttoforloop), all the time, it [url=http://forums.b2evolution.net//viewtopic.php?t=8470]drives me nuts.[/url]

21 Jul 16, 2006 09:15

The point of using both is that the latter saves me having to add an onload function ;)

Using $s shouldn't affect you inside a plugin or function and using $s instead of something more descriptive like $size is just as bad surely? :roll:

¥

22 Jul 16, 2006 09:19

But if u are using the second u don't need the first, if u are using the first you don't need the second.

using $s instead of something more descriptive like $size is just as bad surely?

How many times do u use $i in programming, and maybe what u said can go the same way to b2evo, maybe they should be using $b2evo_search.

23 Jul 16, 2006 09:23

Balupton wrote:

But if u are using the second u don't need the first, if u are using the first you don't need the second.

1/ css has to go in <head> for validation reasons
2/ If I put the js in <head> then I'd need to code an onload function which extends any (potential) current onload triggers, therefore it was easier to put it after <input id="o"> had been defined ;)

Balupton wrote:

and maybe what u said can go the same way to b2evo, maybe they should be using $b2evo_search.

Agreed, but two wrongs don't make a right, right? ;)

¥

24 Jul 16, 2006 18:50

I'm not sure, if the basic_antispam_plugin should handle this or if it should be a core setting.

Also, what setting would be needed?

"Automatically publish comments of members"?

Should user levels be taken into account?

25 Jul 16, 2006 19:13

Personally I don't think it should be a core setting, otherwise antispam ends up entwined into the core like IE is entwined into windows.

It's also not a problem with what "basic_antispam" does, after all it does what it says it does.

There's a smidge of a problem with the code I'm using in the plugin I've written but I'd be delighted if you wanted to cast your eye over it?

¥

26 Jul 16, 2006 19:15

blueyed wrote:

I'm not sure, if the basic_antispam_plugin should handle this or if it should be a core setting.

Also, what setting would be needed?

"Automatically publish comments of members"?

Should user levels be taken into account?

I would say a core setting that allows for automatically publishes comments by members who also happen to be allowed to post in the blog they're commenting on. That way a spammer who registers won't get around the moderation. After that, or in addition to that, also say "If a user is level N (or a member of group Y?) they can automatically comment published on ANY blog in this installation". This way every authorized blogger in blog #N can comment on any post, and the bloggers who have an elevated level (or specified group?) can comment on any blog in the system even if they can't post in it.

Just trying to think a bit beyond my "I'm my only blogger in all my blogs and don't want to be moderated" application!

Edit: added "allows for" (in blue) above.

27 Jul 16, 2006 20:16

¥åßßå wrote:

There's a smidge of a problem with the code I'm using in the plugin I've written but I'd be delighted if you wanted to cast your eye over it?

The if-current-User-return-minus-100-spam-karma-plugin? What problem do you mean? (apart from that it's too simple, because a just-registered-level-0-user would also benefit from it)

28 Jul 16, 2006 20:20

EdB wrote:

I would say a core setting that allows for automatically publishes comments by members who also happen to be allowed to post in the blog they're commenting on.

Very good point. Perhaps that shouldn't even be a setting, but the default behaviour.. who can add items, should be allowed to add comments.

EdB wrote:

"If a user is level N (or a member of group Y?) they can automatically comment published on ANY blog in this installation"

Should this get added to the basic_antispam_plugin then (which would just say "-100" spam karma)?

29 Jul 16, 2006 20:48

Agreed on both points. "if you can post you can comment" makes sense as 'the way', and a plugin to extend the automagic comments unmoderated idea to either level or group.

Marginally Related:
I was also thinking, and I believe it's doable, that if a group level is below a certain number a user can do foo. That way I could say "bloggers in a group number less than 3 or with a level greater than 5 can foo" to include all bloggers in groups 1 and 2, and some 'trusted' bloggers who aren't in either of those groups.

30 Jul 16, 2006 21:54

Blueyed wrote:

The if-current-User-return-minus-100-spam-karma-plugin? What problem do you mean? (apart from that it's too simple, because a just-registered-level-0-user would also benefit from it)

This is the current plugin code, but as I said it has a tad of a glitch (that I've not had time to track down). It's a little more involved than the original that I posted.

I "think" it's with this section of code :-

					if( $this->Settings->get( 'allow_author' ) and ( in_array( $current_User->ID, array( $params[ 'Comment' ]->Item->creator_user_ID, $params[ 'Comment' ]->Item->lastedit_user_ID, $params[ 'Comment' ]->Item->assigned_user_ID ) ) ) )
				{	// set karma based on post author(s) (overrides user level karma and blog membership, although how they hell they post without being a blog member is beyond me ...... better safe than sorry huh? )
					$karma = $this->Settings->get( 'author_karma' );

¥

31 Jul 17, 2006 09:31

Yay, cured the damn thing :D

¥


Form is loading...