It is currently Fri Nov 15, 2019 7:30 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Search PureBasic Forum
PostPosted: Sat Jan 21, 2012 6:07 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Jul 25, 2004 4:21 pm
Posts: 442
Location: US
(Should this be a sticky somewhere?)

PROBLEM:
The forum search feature can render some useless results when attemting to find terms it decides should be ignored. A simple example of this is the term EN_CHANGE. First thing the forum search will do is cast out the underscore and suddenly your single-word search term becomes two separate words (EN + CHANGE). Next it will cast out the ''EN'' because the word is considered to be too short. Placing the whole term in double quotes doesn't help because the forum search will cast out the quotes before it proceeds to disect and destroy the desired search term. Search results end up looking something like this:
    Search found 7653 matches
    Search term used: +change ignored: en

SOLUTION:
Very effective way to search any forum is to use google. You will need to isolate your search to show only the results from the PureBasic forum. You can do this with the special ''site:'' + ''domain" keyword.
For our purposes, using the example above, go to google and make the first search term (single-word, no-spaces) like this:
    site:forums.purebasic.com
Next, you need to type in a way that will tell google your search term is important AND you do not want it disected. The plus sign says this term is important and the quotes say do not disect, so the actual search term you are looking for would look something like this:
    +"EN_CHANGE"
Put it all together into the Google search box and it looks like this:
    site:forums.purebasic.com +"EN_CHANGE"
(Notice there is a space used here ^ after the .com and before the +''EN_CHANGE'')

Try to find ''in a way'' in the forum search and you get nothing, but not using Google. Try the following in Google for some interesting results:
    site:forums.purebasic.com +''in a way''
    site:forums.purebasic.com +''in a way'' +''in a way''
    site:forums.purebasic.com +''in a way'' +''in a way'' +''in a way''
    site:forums.purebasic.com +''in a way'' +''in a way'' +''in a way'' +''in a way''

_________________
- - - - - - - - - - - - - - - -
Randy
http://www.redrival.com/ethics IF (PureBasic > PowerBasic) AND (PowerBasic > Visual_Basic) THEN PureBasic > Visual_Basic


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Sat Jan 21, 2012 6:40 am 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3117
Location: Boston, MA
http://www.purebasic.fr/english/viewtopic.php?p=363595#p363595

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Sun Jan 22, 2012 2:33 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon May 10, 2010 4:02 pm
Posts: 149
A simple search on the main forum PureBasic:

Code:
;{ Windows
Enumeration
  #Window_0
EndEnumeration
;}
;{ Gadgets
Enumeration
  #Frame3D_1
  #Text_2
  #Text_3
  #Text_4
  #Text_5
  #String_6
  #String_7
  #String_8
  #String_9
  #Container_10
  #Option_11
  #Option_12
  #Option_13
  #Option_14
  #Button_15
  #HyperLink_16
EndEnumeration
;}
Define.l Event, EventWindow, EventGadget, EventType, EventMenu

;}
Procedure OpenWindow_Window_0()
  If OpenWindow(#Window_0, 156, 142, 626, 346, "Search the forums for PureBasic (Google)", #PB_Window_SystemMenu|#PB_Window_SizeGadget|#PB_Window_MinimizeGadget|#PB_Window_TitleBar)
   
      FrameGadget(#Frame3D_1, 5, 15, 605, 155, "Setting")
      TextGadget(#Text_2, 10, 40, 140, 20, "with all of the words:")
      TextGadget(#Text_3, 10, 65, 135, 20, "with the exact phrase")
      TextGadget(#Text_4, 10, 91, 135, 20, "with any words")
      TextGadget(#Text_5, 10, 115, 135, 20, "NOT containing the words")
      StringGadget(#String_6, 160, 40, 420, 20, "")
      StringGadget(#String_7, 160, 65, 420, 20, "")
      StringGadget(#String_8, 160, 90, 420, 20, "")
      StringGadget(#String_9, 160, 115, 420, 20, "")
      ButtonGadget(#Button_15, 165, 270, 235, 25, "Start search")
      HyperLinkGadget(#HyperLink_16, 5, 320, 280, 20, "The most accurate search", #Blue, #PB_HyperLink_Underline)
      GadgetToolTip(#HyperLink_16, "The clipboard is selected forum")

      ContainerGadget(#Container_10, 10, 190, 600, 70)
        OptionGadget(#Option_11, 5, 5, 285, 15, "Russian Forum"):
        OptionGadget(#Option_12, 5, 25, 285, 15, "English Forum"):SetGadgetState(#Option_12,1)
        OptionGadget(#Option_13, 295, 5, 285, 15, "German Forum")
        OptionGadget(#Option_14, 295, 25, 285, 15, "French Forum")
      CloseGadgetList()
   
  EndIf
EndProcedure

OpenWindow_Window_0()

;{- Event loop
Repeat
  Event = WaitWindowEvent()
  Select Event
    ; ///////////////////
    Case #PB_Event_Gadget
      EventGadget = EventGadget()
      EventType = EventType()
      If EventGadget = #Frame3D_1
      ElseIf EventGadget = #Button_15
        Inquiry$=""
        If GetGadgetState(#Option_11)
           Forum$="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fpurebasic.info%2FphpBB3ex";http://purebasic.info/phpBB3ex/
           ElseIf  GetGadgetState(#Option_12)
           Forum$="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.purebasic.fr%2Fenglish"
           ElseIf  GetGadgetState(#Option_13)
           Forum$="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.purebasic.fr%2Fgerman"
           ElseIf  GetGadgetState(#Option_14)
           Forum$="http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.purebasic.fr%2Ffrench"
        EndIf
         
           
            If Len(GetGadgetText(#String_6))>2
                Inquiry1$="+"+URLEncoder(GetGadgetText(#String_6))
                Else
                Inquiry1$=""
            EndIf
            If Len(GetGadgetText(#String_7))>2
                Inquiry2$="+"+Chr(34)+URLEncoder(GetGadgetText(#String_7))+Chr(34)
                Else
                Inquiry2$=""
            EndIf
            If Len(GetGadgetText(#String_8))>2
             For i=1 To Len(GetGadgetText(#String_8))
                word$=StringField(GetGadgetText(#String_8), i, " ")
                If Len(word$)
                Inquiry3$=Inquiry3$+" | "+word$
                EndIf
             Next i
             Inquiry3$=URLEncoder(Inquiry3$)
            Else
                Inquiry3$=""
            EndIf
            If Len(GetGadgetText(#String_9))>2
            For i=1 To Len(GetGadgetText(#String_9))
                word$=StringField(GetGadgetText(#String_9), i, " ")
                If Len(word$)
                Inquiry4$=Inquiry4$+"+-"+word$
                EndIf
             Next i
             Inquiry4$=URLEncoder(Inquiry4$)
            Else
                Inquiry4$=""
            EndIf
            Inquiry$= Forum$+Inquiry1$+Inquiry2$+Inquiry3$+Inquiry4$
           
            RunProgram(Inquiry$)
       
             
      ElseIf EventGadget = #HyperLink_16
        If GetGadgetState(#Option_11)
           SetClipboardText("http://purebasic.info/phpBB3ex/")
           ElseIf  GetGadgetState(#Option_12)
           SetClipboardText("http://www.purebasic.fr/english")
           ElseIf  GetGadgetState(#Option_13)
           SetClipboardText("http://www.purebasic.fr/german")
           ElseIf  GetGadgetState(#Option_14)
           SetClipboardText("http://www.purebasic.fr/french")
        EndIf
      RunProgram("http://www.google.com/advanced_search")
      EndIf
    ; ////////////////////////
    Case #PB_Event_CloseWindow
      EventWindow = EventWindow()
      If EventWindow = #Window_0
        CloseWindow(#Window_0)
        Break
      EndIf
  EndSelect
ForEver
;
;}



Last edited by kvitaliy on Mon Aug 15, 2016 5:47 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Sun Jan 22, 2012 5:17 pm 
Offline
Moderator
Moderator
User avatar

Joined: Sat Apr 26, 2003 1:11 am
Posts: 1390
Randy Walker wrote:
(Should this be a sticky somewhere?)

done, and also splitted topic into
viewtopic.php?f=17&t=48957
thx

_________________
SPAMINATOR NR.1


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Mon Jan 23, 2012 7:01 pm 
Offline
Addict
Addict

Joined: Thu Nov 01, 2007 5:37 pm
Posts: 1981
Location: Germany
I suggest to use "purebasic.fr" instead of "forums.purebasic.com" as the search url. The search engine of your choice will prefer results in your native language anyway and if you're searching for something really specific you might get helpful codes from the German and French forum as well! (hint: website translators ;))

_________________
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Wed Feb 01, 2012 3:35 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Feb 01, 2012 3:30 pm
Posts: 748
Location: Nottinghamshire UK
Changed line 85 to

85 Inquiry2$="+"+URLEncoder(Chr(34)+GetGadgetText(#String_7)+Chr(34))

changed position of chr(34) for the " to be in the right place when searching with exact phrase
was

85 Inquiry2$="+"+Chr(34)+URLEncoder(GetGadgetText(#String_7))+Chr(34)

:)

_________________
malleo, caput, bang. Ego, comprehendunt in tempore


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Thu Feb 02, 2012 5:23 am 
Offline
Enthusiast
Enthusiast

Joined: Mon May 10, 2010 4:02 pm
Posts: 149
Zebuddi123 wrote:
Changed line 85 to

85 Inquiry2$="+"+URLEncoder(Chr(34)+GetGadgetText(#String_7)+Chr(34))

changed position of chr(34) for the " to be in the right place when searching with exact phrase
was

85 Inquiry2$="+"+Chr(34)+URLEncoder(GetGadgetText(#String_7))+Chr(34)

:)

Ok!


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Thu Feb 02, 2012 12:53 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Feb 01, 2012 3:30 pm
Posts: 748
Location: Nottinghamshire UK
@kvitaliy

Sorry was in a rush yesterday!!! thanks for the code its a great little program. using it all the time set as a tool in my pb ide

Thanks for sharing

Zebuddi

_________________
malleo, caput, bang. Ego, comprehendunt in tempore


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Fri May 17, 2013 7:59 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Oct 16, 2009 10:12 am
Posts: 602
Location: BE
My 5 cents on Search PureBasic Forum :

I experience that much more results can be found with a Google Search like this "PureBasic bitblt", in this case if bitblt is what to look for.

_________________
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Mon Jul 01, 2013 9:09 pm 
Offline
Addict
Addict
User avatar

Joined: Tue May 10, 2005 10:00 pm
Posts: 1648
Location: Norway
Google using searches like this: bitblit site:purebasic.com.. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Mon Jul 15, 2013 3:44 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Sat May 17, 2003 11:31 am
Posts: 6073
Doin' that for ages in CodeCaddy...

_________________
( PB5.xx Win10 x64 Asrock AB350 Pro4 Ryzen 1600X 32GB RAM Evo 840 GTX1060 )
( The path to enlightenment and the PureBasic Survival Guide right here... )


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Tue Aug 09, 2016 9:19 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Feb 25, 2013 5:51 pm
Posts: 566
Location: US or Estonia
I use this sometimes. It's basically reductive search used to find un-fixed PB bugs. I used Delay() and top-level pagination to avoid stressing the server on top of not parsing and requesting anything.

Code:
;Un-fixed bugs reported on PB forums finder thing
EnableExplicit
InitNetwork()
Dim fmz.s(3,1)
fmz(0,0)="4"
fmz(0,1)="Windows Bugs"
fmz(1,0)="23"
fmz(1,1)="Linux Bugs"
fmz(2,0)="24"
fmz(2,1)="OSX Bugs"
fmz(3,0)="37"
fmz(3,1)="Doc Bugs"
Define look.l=30,i.l=0,ii.l=0,*buffer,html$,posts.l
Declare unsolved(html$)

Debug "<html><header></header><body style="+Chr(34)+"background-color:#000;color:#0f0;"+Chr(34)+">"
For i = 0 To ArraySize(fmz())
  Debug "<h1>"+fmz(i,1)+"</h1>"
  *buffer=ReceiveHTTPMemory("http://www.purebasic.fr/english/viewforum.php?f="+fmz(i,0))
  If *buffer
    html$=PeekS(*buffer,MemorySize(*buffer),#PB_UTF8)
    FreeMemory(*buffer)
    unsolved(html$)
    ;get thread count
    For ii=3000 To 0 Step -1
      If CountString(html$,"&amp;start="+Str(ii))>0
        posts=ii+30
        Break
      EndIf
    Next
    ;paginate
    Repeat
      *buffer=ReceiveHTTPMemory("http://www.purebasic.fr/english/viewforum.php?f="+fmz(i,0)+"&start="+Str(look))
      If *buffer
        html$=PeekS(*buffer,MemorySize(*buffer),#PB_UTF8)
        FreeMemory(*buffer)
        unsolved(html$)
      Else
        Break
      EndIf
      look=look+30
      If look>posts : Break : EndIf
      Delay(Random(15000,5000))
    ForEver
    look=30 : posts=0
  EndIf
Next
Debug "</body></html>"
End

Procedure unsolved(html$)
  Protected title.s
  Protected url.s
  Protected pos.l
  Repeat
    pos=FindString(html$,"topictitle",pos+1)
    If Not pos : Break : EndIf
    title=Mid(html$,pos+12,FindString(html$,"<",pos+12)-(pos+12))
    url=Mid(html$,FindString(html$,"href="+Chr(34),pos-100)+6,FindString(html$,Chr(34),(FindString(html$,"href="+Chr(34),pos-100)+6))-(FindString(html$,"href="+Chr(34),pos-100)+6))
    url=ReplaceString(url,"&amp;","&")
    url=ReplaceString(url,"./","http://www.purebasic.fr/english/")
    If CountString(url,"&sid=")>0 : url=ReplaceString(url,Mid(url,FindString(url,"&sid="),37),"") : EndIf
    If CountString(title,"Done")=0 And CountString(title,"done")=0
      Debug "<a href="+Chr(34)+url+Chr(34)+">"+title+"</a><br>"
    EndIf
    title="" : url=""
  ForEver
EndProcedure


I wonder if stuff like this still works on Google:
Code:
site:purebasic.fr inurl:/english/ ("assembly" | "push" | "jnz" | "_(") -inurl:f=12

_________________
The truth hurts.


Top
 Profile  
Reply with quote  
 Post subject: Re: Search PureBasic Forum
PostPosted: Tue Aug 09, 2016 9:32 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1673
for PB searches i just google with "inurl:purebasic", which can also help find Russian and Chinese and other non-purebasic.com English contributions (and also searches purebasic.fr though im not sure if that makes a difference to purebasic.com). Agree that phpBB's search is almost useless, which took me all of 1 week as a PB newbie to realise lol, but is good for searching specifically for a couple things like authors, or specifically searching topics instead of message bodies.

Another thing i find handy to exploit is PB's unique "_" suffix on API's which can make googling for PB-specific API-specific code easy. For example, just do a search for "FindWindow_" and the top results are all Purebasic, even without adding "inurl:purebasic" or anything, and despite google being drowned in various source codes from all languages calling that not-uncommon API

_________________
Thankyou to all the coders who generously helped & encouraged me in the nearly 2yrs when i was welcome here,
it was a tremendous privilege. I learned a lot. I wish you and your families all the best and success for the future.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye