vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - AMP Quick Auto Tagger (https://vborg.vbsupport.ru/showthread.php?t=235469)

vexvegaz 02-15-2010 07:08 PM

Quote:

Originally Posted by testbot (Post 1983161)
i haven't installed vbookie. do you know if it has any parse_template plugins? if you're not sure, i can install it and take a look.

i didnt see it heres all the plug-in associated with vbookie
useradmin_edit_column1
cache_templates
threaddata_delete
template_groups
process_templates_complete
newthread_post_start
newthread_post_complete
forumdisplay_query
newthread_form_start
userdata_start
showthread_complete
threadbit_process
online_location_unknown
online_location_process

testbot 02-15-2010 07:43 PM

i was looking at it and it might be the template edits made by vbookie. the auto tagger parses the template to add the javascript.

can you give me the url to your forum? i might be able to see why it's messed up w/o having to install it on one of my forums. if you don't want to post the url here feel free to PM it to me.

Jabong82 02-15-2010 07:43 PM

Thanks for this mod it works great! Installed.

Arsh 02-15-2010 08:46 PM

The mod was working fine but all of sudden I started getting this error when starting new threads:

Parse error: syntax error, unexpected T_STRING in /home/iwd123/public_html/forums/includes/class_core.php(4029) : eval()'d code on line 24

I disabled the mod and the error went away. Any ideas?

testbot 02-15-2010 08:57 PM

Quote:

Originally Posted by Arsh (Post 1983258)
The mod was working fine but all of sudden I started getting this error when starting new threads:

Parse error: syntax error, unexpected T_STRING in includes/class_core.php(4029) : eval()'d code on line 24

I disabled the mod and the error went away. Any ideas?

most the time that error is when there's a quote, semicolon out of place in a plugin.

was any of the AMP Tagger plugin code changed?

did you install any new mods that might conflict with this one?

where any changes made to the newthread template?

it's still beta so i'm not sure what other products conflict with this one yet but i'll do my best to get this sorted for you.

Arsh 02-16-2010 01:26 AM

Quote:

Originally Posted by testbot (Post 1983265)
most the time that error is when there's a quote, semicolon out of place in a plugin.

was any of the AMP Tagger plugin code changed?

did you install any new mods that might conflict with this one?

where any changes made to the newthread template?

it's still beta so i'm not sure what other products conflict with this one yet but i'll do my best to get this sorted for you.

Hi mate,

I did not change any code nor I installed any other mods in the meanwhile. I used VB4's advertisement system to enable few ads but they were only in footer. The error itself came on when I wasn't even online. When I went to bed everything seemed fine but when I woke up I had handful of complaints regarding the error.

I understand this is still beta, so no rush from me.

Cheers

mrdexx 02-16-2010 04:39 AM

Is it possible to have the mod simply not tag "common" words instead of returning a post back with an error?

Its kind of annoying to type out a post, submit it, only to find out that one of the title words is too "common" and needs to be removed as a tag (that was auto-entered to begin with)

If the system is able to identify common words anyways, then can't it also just not add them?

Is it possible to allow common words to be posted somehow in the meantime so users don't have to get their posts constantly returned?

Thanks,

~Dexx

testbot 02-16-2010 02:53 PM

Quote:

Originally Posted by testbot (Post 1978835)
Currently only supports English... sorry
Current Suggested AMP Tagger Bad Words:

Quote:

Originally Posted by Arsh (Post 1983451)
Hi mate,

I did not change any code nor I installed any other mods in the meanwhile. I used VB4's advertisement system to enable few ads but they were only in footer. The error itself came on when I wasn't even online. When I went to bed everything seemed fine but when I woke up I had handful of complaints regarding the error.

I understand this is still beta, so no rush from me.

Cheers

can you pm me your forum url so i can take a look? i don't see any reason this should generate this error yet.

Quote:

Originally Posted by mrdexx (Post 1983531)
Is it possible to have the mod simply not tag "common" words instead of returning a post back with an error?

Its kind of annoying to type out a post, submit it, only to find out that one of the title words is too "common" and needs to be removed as a tag (that was auto-entered to begin with)

If the system is able to identify common words anyways, then can't it also just not add them?

Is it possible to allow common words to be posted somehow in the meantime so users don't have to get their posts constantly returned?

Thanks,

~Dexx

Hi Dexx,

add any words that you don't want tagged to AMP Tagger Bad Words. you can find it in AdminCP> Options

we've been running it on our board for a while now and members are reporting common words. so far we have it running pretty well. below is our current list of common words to add.

mrdexx 02-17-2010 04:18 AM

Much appreciated, thank you =)

testbot 02-18-2010 08:12 PM

FYI: We've been testing all day on vb 4.0.2 and it seems to be working well.

Also updated all of the AMP Auto Tagger Bad Words. This should stop anyone from getting 'someword is too common' errors when they post.

Code:

according,able,about,above,accordingly,across,actually,after,afterwards,again,against,aint,all,allow,allows,almost,alone,along,already,also,although,always,among,amongst,amoungst,amount,and,another,any,anybody,anyhow,anyone,anything,anyway,anyways,anywhere,apart,appear,appreciate,appropriate,are,arent,around,aside,ask,asking,associated,available,away,awfully,back,became,because,become,becomes,becoming,been,before,beforehand,behind,being,believe,below,beside,besides,best,better,between,beyond,bill,both,bottom,brief,but,call,came,can,cannot,cant,cause,causes,certain,certainly,changes,clearly,cmon,com,come,comes,computer,con,concerning,consequently,consider,considering,contain,containing,contains,corresponding,could,couldnt,course,cry,currently,day,definitely,describe,described,despite,detail,did,didnt,different,does,doesnt,doing,done,dont,down,downwards,due,during,each,edu,eight,either,eleven,else,elsewhere,empty,enough,entirely,especially,etc,even,ever,every,everybody,everyone,everything,everywhere,exactly,example,except,far,few,fifteen,fifth,fify,fill,find,fire,first,five,followed,following,follows,for,former,formerly,forth,forty,found,four,from,front,full,further,furthermore,get,gets,getting,give,given,gives,goes,going,gone,got,gotten,greetings,guy,had,hadnt,happens,hardly,has,hasnt,have,havent,having,hello,help,hence,her,here,hereafter,hereby,herein,heres,hereupon,hers,herself,hes,hey,him,himself,his,hither,hopefully,how,howbeit,however,hundred,ignored,ill,immediate,inasmuch,inc,indeed,indicate,indicated,indicates,inner,insofar,instead,interest,into,inward,isnt,ist,itd,itll,its,itself,ive,just,keep,keeps,kept,know,known,knows,last,lately,later,latter,latterly,least,less,lest,let,lets,like,liked,likely,little,look,looking,looks,ltd,made,mainly,many,may,maybe,mean,meanwhile,merely,might,mill,mine,more,moreover,most,mostly,move,much,must,myself,name,namely,near,nearly,necessary,need,needs,neither,never,nevertheless,new,next,nine,nobody,non,none,noone,nor,normally,not,nothing,novel,now,nowhere,obviously,off,often,okay,old,once,one,ones,only,onto,originally,other,others,otherwise,ought,our,ours,ourselves,out,outside,over,overall,own,part,particular,particularly,per,perhaps,placed,please,plus,possible,posted,presumably,probably,provides,put,que,quite,quote,rather,really,reasonably,regarding,regardless,regards,relatively,respectively,right,said,same,saw,say,saying,says,second,secondly,see,seeing,seem,seemed,seeming,seems,seen,self,selves,sensible,sent,serious,seriously,seven,several,shall,she,should,shouldnt,show,side,since,sincere,six,sixty,some,somebody,somehow,someone,something,sometime,sometimes,somewhat,somewhere,soon,sorry,specified,specify,specifying,still,sub,such,sup,sure,system,take,taken,tell,ten,tends,than,thank,thanks,thanx,that,thats,the,their,theirs,them,themselves,then,thence,there,thereafter,thereby,therefore,therein,theres,thereupon,these,they,theyd,theyll,theyre,theyve,thick,thin,think,third,this,thorough,thoroughly,those,though,three,through,throughout,thru,thus,together,too,took,top,toward,towards,tried,tries,truly,try,trying,twelve,twenty,twice,two,under,unfortunately,unless,unlikely,until,unto,upon,use,used,useful,uses,using,usually,value,various,very,via,viz,want,wants,was,wasnt,way,wed,welcome,well,went,were,werent,weve,what,whatever,whats,when,whence,whenever,where,whereafter,whereas,whereby,wherein,wheres,whereupon,wherever,whether,which,while,whither,who,whoever,whole,whom,whos,whose,why,will,willing,wish,with,within,without,wonder,wont,would,wouldnt,yes,yet,you,youd,youll,your,youre,yours,yourself,yourselves,youve,zero


This is not a product update so you don't need to download and reinstall or anything. You can just copy the AMP Auto Tagger Bad words into your AdminCP>Options>AMP Auto Tagger and you should be good.

skwestle 02-19-2010 04:59 AM

Thanks for the mod I love it

testbot 02-19-2010 02:07 PM

Quote:

Originally Posted by Arsh (Post 1983451)
Hi mate,

I did not change any code nor I installed any other mods in the meanwhile. I used VB4's advertisement system to enable few ads but they were only in footer. The error itself came on when I wasn't even online. When I went to bed everything seemed fine but when I woke up I had handful of complaints regarding the error.

I understand this is still beta, so no rush from me.

Cheers

i'm still thinking about what could be causing this.

if it was working one moment and then in the middle of the night something happened, can you check your scheduled tasks around the same time you started seeing the error?

if there's an error with the code then the error would have started the second you enabled the plugin and then tried to create a thread. that's what made me think of scheduled tasks/cron jobs in vb.

thanks!

Quote:

Originally Posted by skwestle (Post 1986180)
Thanks for the mod I love it

I'm very happy that you like it.

Can you please mark that you installed it so you receive notifications about updates and any bug fixes?

bartek24m 02-25-2010 11:41 AM

nice work, mark as tagged and waiting for update older threads?

when i can exept it ?

testbot 02-25-2010 02:45 PM

i think i might release the updater for older threads as a separate product. right now, part of this mods appeal is that there's absolutely no database changes, it's fast and simple. the updater will require database changes and a file to uplodad.

simba6666 02-26-2010 03:16 PM

I hope the product support other languages

It's Great

Waiting for Arabic Languages . . . .

arena 02-26-2010 11:58 PM

Quote:

I think that the regex/javascipt sees those as special characters and removes them.
how this regex/javascipt find?

Crystal Shards 02-27-2010 10:00 PM

My only complaint is the lack of capability for older tags. I hope this is addressed in the updates! Other than that, it looks great.

rule0 02-28-2010 10:33 AM

thank you, been waiting for this.

dippetas 03-25-2010 09:07 PM

does anybody know how am i gonna enable this mod for greek language??? No matter what i try to do it's seems that it doesn't show greek chars, I've changed encoding to utf-8 in xml, but still nothing. Please if anybody knows, share it with me.

testbot 03-25-2010 09:15 PM

i think it's the regex in the plugin.

i don't know how to write regular expressions in greek. :(

testbot 03-25-2010 09:19 PM

i believe the following is what strips non english words from tags. if anyone knows how to translate it that would be great.

Code:

var subject = document.vbform.subject.value.replace(/[^a-zA-Z 0-9]+/gi,"");
subject = subject.replace(/(\b(\w{1,2})\b(\s|$))|(\b(\w{19,})\b(\s|$))/g,"");
var newtaglist = filterText(subject);
newtaglist = trim(newtaglist);
newtaglist = newtaglist.replace(/\s+/g," ");
document.vbform.taglist.value = newtaglist.replace(/ /gi,",");


dippetas 03-26-2010 08:17 AM

Quote:

Originally Posted by testbot (Post 2010265)
i believe the following is what strips non english words from tags. if anyone knows how to translate it that would be great.

Code:

var subject = document.vbform.subject.value.replace(/[^a-zA-Z 0-9]+/gi,"");
subject = subject.replace(/(\b(\w{1,2})\b(\s|$))|(\b(\w{19,})\b(\s|$))/g,"");
var newtaglist = filterText(subject);
newtaglist = trim(newtaglist);
newtaglist = newtaglist.replace(/\s+/g," ");
document.vbform.taglist.value = newtaglist.replace(/ /gi,",");


i think that i need only to change the regular expression command in greek is that right?, it should be something like that
Code:

var subject = document.vbform.subject.value.replace(/[^α-ωΑ-Ω 0-9]+/gi,"");
is that right?
do i have to change anything else? :)

testbot 03-26-2010 01:03 PM

Quote:

Originally Posted by dippetas (Post 2010426)
i think that i need only to change the regular expression command in greek is that right?, it should be something like that
Code:

var subject = document.vbform.subject.value.replace(/[^α-ωΑ-Ω 0-9]+/gi,"");
is that right?
do i have to change anything else? :)

i think so. the rest really just removes spaces and stuff. give it a try and let me know how it works.

i'll be updating this soon because there's still a few slight bugs. if that works i'll incorporate that into the code.

dippetas 03-26-2010 07:59 PM

Quote:

Originally Posted by testbot (Post 2010521)
i think so. the rest really just removes spaces and stuff. give it a try and let me know how it works.

i'll be updating this soon because there's still a few slight bugs. if that works i'll incorporate that into the code.

unfortunately this didn't work at all, but i will give it a try in order to fix it :D

Professional2 03-28-2010 04:57 AM

i have a lot of topic,does it add tags for them?

dippetas 03-28-2010 08:06 AM

Quote:

Originally Posted by Professional2 (Post 2011426)
i have a lot of topic,does it add tags for them?

if you are referring to me, no it doesn't add at all tags at my threads because the reg exp is only for Latin words and non Unicode. I've tried some solutions with Unicode but nothing.

i'm using this site in order to create and test the reg exp for greek http://www.regexplanet.com/simple/index.html

@testbot
i'm pretty close to solve it only i have a problem it strips spaces and can't place "," for the tag words here is the code
Code:

        var subject = document.vbform.subject.value.replace(/[^[a-zA-Z0-9_\\u00A1-\\uFFFF]+/gi,"");

dippetas 03-28-2010 09:23 AM

1 Attachment(s)
Quote:

Originally Posted by testbot (Post 2010521)
i think so. the rest really just removes spaces and stuff. give it a try and let me know how it works.

i'll be updating this soon because there's still a few slight bugs. if that works i'll incorporate that into the code.

Fixed, it adds Greek tags and english
here is the solution :
Code:

       
function updateTagger(){
                                var subject = document.vbform.subject.value.replace(/[^[a-zA-Z0-9_\\u0020-\\uFFFF]+/gi,"");
                                subject = subject.replace(/(\b(\w{1,2})\b(\s|$))|(\b(\w{19,})\b(\s|$))/g,"");
                                var newtaglist = filterText(subject);
                                newtaglist = trim(newtaglist);
                                newtaglist = newtaglist.replace(/\s+/g," ");
                                document.vbform.taglist.value = newtaglist.replace(/ /gi,",");

and here is the fixed RegExp
Code:

(/[^[a-zA-Z0-9_\\u0020-\\uFFFF]+/gi,"")
:D :D :D :D

This is the attached file for unicode (including greek) and english languages

ffak 04-07-2010 07:36 AM

Quote:

Originally Posted by testbot (Post 1991303)
i think i might release the updater for older threads as a separate product. right now, part of this mods appeal is that there's absolutely no database changes, it's fast and simple. the updater will require database changes and a file to uplodad.

Thanks for your mod.
Do you think you'll release some updater for old threads?

Furcal15 04-07-2010 06:31 PM

Quote:

Originally Posted by ffak (Post 2017298)
Thanks for your mod.
Do you think you'll release some updater for old threads?


I'm also interested in the old threads being automatically updated. Is it possible?

arena 04-07-2010 09:01 PM

Quote:

Originally Posted by dippetas (Post 2011496)
Fixed, it adds Greek tags and english
here is the solution :
Code:

   
function updateTagger(){
                var subject = document.vbform.subject.value.replace(/[^[a-zA-Z0-9_\\u0020-\\uFFFF]+/gi,"");
                subject = subject.replace(/(\b(\w{1,2})\b(\s|$))|(\b(\w{19,})\b(\s|$))/g,"");
                var newtaglist = filterText(subject);
                newtaglist = trim(newtaglist);
                newtaglist = newtaglist.replace(/\s+/g," ");
                document.vbform.taglist.value = newtaglist.replace(/ /gi,",");

and here is the fixed RegExp
Code:

(/[^[a-zA-Z0-9_\\u0020-\\uFFFF]+/gi,"")
:D :D :D :D

This is the attached file for unicode (including greek) and english languages

Please Turkish language help? ? ? Ş ş Ğ ğ ı ? ? ? ?

Alucard^ 04-08-2010 09:08 AM

Quote:

Originally Posted by testbot (Post 1978932)
sorry but no it won't. i'm debating creating a cron for scheduled tasks in future releases though.

I am waiting for this, plz add it :( is a really usefull function!

testbot 04-08-2010 02:12 PM

ok, i'll try to make that happen for the next release. i see it's importaint to everyone.

nstlx 04-11-2010 10:12 AM

For those like me who are having problems with non english words.

I solved the problem this way, for the Portuguese language:

Plugin AMP Auto Tagger:


Code:

if ($vbulletin->options['amp_auto_tagger_enabled'] && THIS_SCRIPT == 'newthread'){       
        $taggerbadwords = str_replace(" ","",$vbulletin->options["amptaggerbadwords"]);
        $taggerbadwords = str_replace(",","\b|",$vbulletin->options["amptaggerbadwords"]);
        //$taggerbadwords = str_replace(" ","\b|",$vbulletin->options["badwords"]);
       
        $tagscript = '<script type="text/javascript">

function removeAccents(strAccents){
    strAccents = strAccents.split("");
    strAccentsOut = new Array();
    strAccentsLen = strAccents.length;
    var accents =

"??????????????????????????????????????????????????????????????";
    var accentsOut =

["A","A","A","A","A","A","a","a","a","a","a","a","O","O","O","O","O","O","O"

,"o","o","o","o","o","o","E","E","E","E","e","e","e","e","e","C","c","D","I"

,"I","I","I","i","i","i","i","U","U","U","U","u","u","u","u","N","n","S","s"

,"Y","y","y","Z","z"];
    for (var y = 0; y < strAccentsLen; y++) {
        if (accents.indexOf(strAccents[y]) != -1) {
            strAccentsOut[y] = accentsOut[accents.indexOf(strAccents[y])];
        }
        else
            strAccentsOut[y] = strAccents[y];
    }
    strAccentsOut = strAccentsOut.join("");
    return strAccentsOut;
}

                        function filterText(sText) {
                                var reBadWords = /'.$taggerbadwords.'\b/gi;
                                return sText.replace(reBadWords, "");
                        }
                        function ltrim(str){
                                return str.replace(/^[ ]+/, "");
                        }
                        function rtrim(str){
                                return str.replace(/[ ]+$/, "");
                        }                       
                        function trim(str){
                                return ltrim(rtrim(str));
                        }

                       
                        function updateTagger(){
                                var subject = document.vbform.subject.value.replace(/[^a-zA-Z 0-9??????????????????????????????????????????????????????????????]+/gi,"");
                                subject = removeAccents(subject);
                                subject = subject.replace(/(\b(\w{1,3})\b(\s|$))|(\b(\w{19,})\b(\s|$));,./g," ");
                               


                                var newtaglist = filterText(subject);
                                newtaglist = trim(newtaglist);
                                newtaglist = newtaglist.replace(/\s+/g," ");
                               
                                document.vbform.taglist.value = newtaglist.replace(/ /gi,",");
                        }
                        </script>';

        $tagscript2 = 'onBlur="updateTagger()"';
        $search = 'name="subject" id="subject"';
        $replace = 'name="subject" id="subject" '.$tagscript2;
        $vbulletin->templatecache['newthread'] = str_replace($search, $replace, $vbulletin->templatecache['newthread']);
        $search = '<form class="vbform block"';
        $replace = $tagscript.'<form class="vbform block"';
        $vbulletin->templatecache['newthread'] = str_replace($search, $replace, $vbulletin->templatecache['newthread']);
}

Other letters missing for other languages can easily be added.

nstlx

dippetas 04-11-2010 12:55 PM

Quote:

Originally Posted by arena (Post 2017630)
Please Turkish language help? ? ? Ş ş Ğ ğ ı ? ? ? ?

i'll give it a go, but i don't promise anything

dippetas 04-11-2010 06:30 PM

1 Attachment(s)
Quote:

Originally Posted by arena (Post 2017630)
Please Turkish language help? ? ? Ş ş Ğ ğ ı ? ? ? ?

I think that i have found a solution i'm gonna give it to you, but i need you to test it for me. Here is the RegExp for Turkish Language. This is that you have to replace in the xml product, and also you should change your encoding to ISO 8859-9
Code:

(/[^A-Z^a-z^0-9^şŞıİ??????Ğğ\s]+/gi,"")
or
Code:

(/[^A-Za-z 0-9_\\0000-\\00FF]+/gi,"")
test the uploaded file for Turkish and let me know.

EDIT: please re-download new file, test it and let me know

arena 04-11-2010 11:11 PM

Dear dippetas not working

Dr.osamA 04-13-2010 05:10 AM

1 Attachment(s)
hi

i fix it for Arabic language & translate it

it working very good for me in VB v. 4.0.3

plzzzzzzzz add the product to 1st post in origenal post

for Demo alra7ba

user : vBulletin
pss : 123456

thanxx agen:D

zelnik 04-14-2010 11:38 AM

Brilliant!!!!

Installed and working on 4.0.3!!! Was worried when the 3.8 version was not going to be upgraded so MANY thanks for doing your own testbot! many many thanks!

zelnik 04-20-2010 01:22 PM

Hi Testbot,

Is there anyway you can make the plugin not include the forbidden words in the tags period?

Right now my users are getting confused when it says that a tag can't be used as most of them have no idea what a tag is in the first place :(

So it's stopping a lot of users posting :(

dippetas 04-20-2010 04:45 PM

Quote:

Originally Posted by zelnik (Post 2024332)
Hi Testbot,

Is there anyway you can make the plugin not include the forbidden words in the tags period?

Right now my users are getting confused when it says that a tag can't be used as most of them have no idea what a tag is in the first place :(

So it's stopping a lot of users posting :(

you can easily delete the common words, and leave only the most nasty one's.You should give the users the benefit to use at least 10 tags when they create a new thread. It will get you out of so mush trouble. This was what i did and helped me.


All times are GMT. The time now is 09:14 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01448 seconds
  • Memory Usage 1,880KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (13)bbcode_code_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete