Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Badges

Try Vanilla Forums Cloud product

okhawaja New

About

Username
okhawaja
Joined
Visits
1
Last Active
Roles
Member
Points
45
Badges
4
  • How would you build a form whose back-end data is based on scraping?

    I have a site, call it www.xyz.com, and it has a search box that you search for various things. For example, vanilla forums has a search box and when you search something, discussions pop-up in a structured format, and that's how my xyz site is.

    I am using Python to automatically search a word on xyz, and then pull the content of the first "discussion" (Python can extract contents based on html tags)...Now where I am REALLY struggling is figuring out how I can make a PHP form on Vanilla that asks the user for a keyword, and then it parses that keyword to my Python app which outputs the extracted contents in response.

    My initial solution is to get the python app to store the extracted contents in a MySQL db, and then get php on vanilla to output the MySQL contents for that keyword if that keyword exists in the previously queried list of keywords...If a user searches a keyword and it has not been previously queried, and is not in the previously queried list, then we have a DB table that lists "keywords to query queue", so then Python app checks at an interval to see if there are items in the "keywords to query queue" and then it querys them, remove them from that table, and stores the data extract inside the previously queried list.

    That's my thought, but could someone suggest a different/better way? Anyone have experience with this?

    coolkid1855
  • Re: Unanswered button gives error

    @River said:

    and sort the modules. https://vanillaforums.org/discussion/comment/232501/#Comment_232501 to position askmodule question you want in the sort.

    The latest version of the plugin Q&A has the module "NewQuestionModule" and I have that as the first module in the sort order, so it's fine for the desktop theme. The problem I am having is that for mobile the NewQuestionModule goes to the bottom along with ALL the other modules. All the modules go above the footer for mobile. That is why I have no idea how I can get it to rank above.

    I JUST Found out what was wrong....I copied my current theme and replicated it. Used the replicated theme as Mobile and changed the {asset name="Panel"} part and move it from footer to below the search bar, so now it works!

    Packham
  • Re: Unanswered button gives error

    @River I just took a new copy of Q&A and changed echo to return, and tried out the plugin with those changes instead of the older changes. Here is what happened:

    Ask a Question button only shows up in Unanswered, when you ask a question it posts it as a type Question, but visually it doesn't look anything different from a regular discussion. Also, commenting in a discussion that's supposed to be a question doesn't make the "Did this answer the question" thing appear, so you can't accept or reject any answers in the discussion. So overall, the suggested change probably needs more modifications than just the change of echo to return.

    Packham
  • Re: GoDaddy to Amazon Web Service

    I really like your idea because I'm always worried about DOS attacks on the site, so I'll give that a try!

    ItsVizionTv
  • Re: GoDaddy to Amazon Web Service

    @whu606 At this point I'm considering Digital Ocean VPS that you mentioned, or NameCheap dedicated server. AWS has already wasted 3 hours of my time trying to figure out why memcache won't install properly, or why the mail plugin for vanilla is still having issues even after Amazon support says the restrictions have been removed.....At this point I'm just like FML because I'm bringing users starting tomorrow to my site and here I am a day before the launch having hosting issues lol...

    ItsVizionTv