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)
-   -   Miscellaneous Hacks - Kindle Daily Deal Grabber by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=280597)

BirdOPrey5 03-23-2012 11:00 PM

Kindle Daily Deal Grabber by BOP5
 
1 Attachment(s)


Version 2.1.4

Compatible with VB 3.7.x, VB 3.8.x, and VB 4.x.x.

Now compatible with Amazon.com, Amazon.uk and Amazon.de!

Every day Amazon has "daily deal" on one or more Amazon Kindle ebooks. This deal will usually reduce the price of an ebook to only $0.99 to $1.99, which is a signficant savings off the regular price.

Recently they started including a daily deal for kids or teens as well.

Amazon allows you to sign up for an email notice of the deal but they are notoriously unreliable. Amazon does NOT offer an official RSS feed of the daily deal either.

This mod will grab the info of each daily deal straight from Amazon and post it to your forum as either a new thread or a new post in an existing thread.

VB4 Demo: Kindle Daily Deal at Qapla.com Forum
VB3 Demo: Kindle Daily Deal at Joe's Ultimate Off Topic

You can completely customize how the post will read using an easy replacement system above.

This mod relies on Amazon providing consistent pages and data. In my testing it works the vast majority of the time. However there is no guarantee it will work all the time on every daily deal. I have done my best to always at least provide a link to the deal even if other info is unavailable but I can't guarantee it will always work.

This mod relies on a scheduled task to run daily. Amazon usually posts the deal by 12 AM Pacific Time. You may need to go to Admin CP -> Scheduled Tasks -> Scheduled Tasks Manager to set a more appropriate time for this task to run on your forum. (Sometimes they are late in posting the deal though so I suggest waiting until at least 2AM Pacific Time to run it. )


Affiliate ID: This mod provides the site Admin the option for providing their own Amazon affiliate ID. If no affiliate ID is provided, my affiliate ID will be used.

If you have viglinks or skimlinks installed on your forum be sure you have the option to overwrite amazon affiliate ids turned on- both companies offer this option.


If upgrading from a 1.x version it is strongly recommended you uninstall the old version first. If you do not you will need to manually edit the Post Content settings to the new value.

Please Mark as Installed if you use this. :)
Donations always appreciated.

BirdOPrey5 03-24-2012 03:37 PM

Reserved

lapiervb 03-24-2012 03:41 PM

Are the books random or can you set it to be related to your forum niche?

BirdOPrey5 03-24-2012 03:44 PM

The books are chosen by Amazon, you have no control.

Krusty1231 03-24-2012 04:35 PM

Nice. I like how the images appear in my scroller as well.

Thanks

Ramsesx 03-24-2012 06:03 PM

Cool stuff, thanks.
When do you expect the German version working?

BirdOPrey5 03-24-2012 07:10 PM

German and UK versions are about 50% done, working on them together... I don't have an exact date though- probably needs me to commit a good day to polish them off.

v123shine 03-25-2012 12:51 PM

Like it :)

Thank you BOP5

Kraxell 03-25-2012 01:33 PM

Waiting for german-version :)

BirdOPrey5 03-26-2012 08:01 AM

Updated to version 1.01 that will fix today's broken image. (Going forward.)

Sorry about this... after 2 weeks of testing with never having a problem with the image, today Amazon added a % sign to the filename, threw everything off.

If you want, re-run the scheduled task and you should get the deal with the working picture, then you can delete the old post with the broken image.

All you really need to upgrade is to upload and overwrite the cron job php file... You don't need to re-import the xml file, the only change to the xml is the version number.

Arkham 03-27-2012 01:38 PM

Quote:

Originally Posted by Ramsesx (Post 2312888)
Cool stuff, thanks.
When do you expect the German version working?

(Heh! I just saw this mod and came in here to scope it out for you. No need to PM you the link now. :)

Good luck with the German one! Great idea.

Is there any other information that can be accessible, e.g. subject or genre? That would be ideal in order to not display irrelevant daily deals. Since the Author field is there, do you think a future version would allow a config to only match predefined authors?

BirdOPrey5 03-27-2012 02:15 PM

I suppose it is technically possible to filter by author but as a matter of being practical- I don't believe they repeat authors all that often... You'd literally be trying to guess at a handful from a pool of millions.

I suppose there could be an option that the title, author, and description fields were searched for keywords you specify, and if any of those were found, then it would post the deal- a lot like the RSS feed search works.

I will try and work that in but I probably won't delay a UK/German release to add that feature.

scottct1 03-27-2012 04:45 PM

This is great THANK YOU!

Any plans for a Free Amazon App of the Day version?

BirdOPrey5 03-27-2012 05:19 PM

Amazon App of The Day is best done via the RSS Feed: http://geekexile.com/amazon_rss.php

No need to re-invent the wheel, it will do basically the same as this.

scottct1 03-27-2012 05:23 PM

You could do that, but what I like about your mod is it posts everything in the same thread instead of creating a new thread every day.

Also the RSS feed does not seem to contain a link you can click on to get the app. :)

BirdOPrey5 03-27-2012 05:29 PM

I use this mod to make all posts in the same thread:
https://vborg.vbsupport.ru/showthread.php?t=261003

Example of how I use it on my forum:
http://www.juot.net/forums/showthrea...t=59771&page=3

So that gets it pretty close. Unless that RSS feed closes down I don't anticipate making one for the app deals.

BirdOPrey5 04-08-2012 11:01 AM

Updated to 1.03 to deal with when they (Amazon) use HTML tags inside multi-deal titles like they did today.

Like with the last update if you're not concerned about the version number all you need to do is upload the new php file in the /includes/cron/ directory.

However you can follow the full upgrade instructions to have your installed version number updated as well.

BirdOPrey5 04-15-2012 10:23 AM

Updated to Version 1.04
-Fixed the problem that showed up today with Amazon using a different image URL for today's deal.
-Pushed the default time back of the cron job about 2 hours. Amazon has been late posting the deal lately causing empty data to be collected.

It is recommended you run the full upgrade procedure.
(Upload an overwrite the php file AND import and overwrite = Yes the product xml file.)

BirdOPrey5 04-29-2012 11:47 AM

Updated to 1.06-

Fixes a few changes Amazon has made over the last couple weeks, including this morning's change to the multi-book deal price.

Overwrite all files on upload and re-import xml product file, allow overwrite set to yes.

scottct1 04-30-2012 02:36 PM

Installed the new version and now its not filling in all the info.

Was working fine before. Here is what a post looks like now.

http://www.satelliteguys.us/chit-cha...ml#post2851241

Quote:

Kindle Daily Deal for 04-30-2012

Title: After Midnight in the Garden of Good and EvilMarilyn Bardsley exposes the naked truth behind the death of Danny Hansford at the hands of his eccentric lover, the iconic Savannah, Georgia, socialite Jim Williams. It's a bizarre, page-turning look at the crime which inspired the best-selling novel and hit movie, Midnight in the Garden of Good and Evil. By {AUTHOR}



About: Marilyn Bardsley exposes the naked truth behind the death of Danny Hansford at the hands of his eccentric lover, the iconic Savannah, Georgia, socialite Jim Williams. It's a bizarre, page-turning look at the crime which inspired the best-selling novel and hit movie, Midnight in the Garden of Good and Evil.

MSRP: {PRINTPRICE}
Amazon Regular Price: $2.99
Discount: -$2.00
Deal Price: $0.99 (Today Only - 04-30-2012)

Rated: {RATING} of 5 Stars

Buy It Now or Browse Amazon.com.

More...
{LONGDESC}

Language: {LANGUAGE}
# of Pages: {PAGES}
File Size: {FILESIZE}
Published by {PUBLISHER}, on {PUBDATE}.
ISBN Number: {ISBN}

BirdOPrey5 04-30-2012 03:18 PM

Were you using the full version before? It looks like it would if you replaced the full (but still free) version with this BASIC version.

The full version can only be downloaded from Qapla.com. You will need to upgrade from there too.

BirdOPrey5 12-08-2012 03:15 PM

Updated to version 2.0- Now supports daily kids/teen deals as well.

Suggest you uninstall any 1.x version before upgrading.

imported_stefan 12-10-2012 02:54 PM

German Version at 99% maybe ?

:)

You need a tester ?

;-)

BirdOPrey5 12-10-2012 05:29 PM

1 Attachment(s)
German should be done soon.

Do these translations look OK?

https://vborg.vbsupport.ru/attachmen...1&d=1355165691

Shogo 12-10-2012 06:00 PM

Very nice...
Do you planed to make a bot for deal website like : groupon, ibood.com, qoqa.fr,...

Everyday there is a new (or more) deal on those websites.

BirdOPrey5 12-10-2012 06:33 PM

Quote:

Originally Posted by Shogo (Post 2389821)
Very nice...
Do you planed to make a bot for deal website like : groupon, ibood.com, qoqa.fr,...

Everyday there is a new (or more) deal on those websites.

Most of those sites I believe have RSS feeds which are easier and less work to setup.

For example I have an RSS feed from woot.com on my forum: http://www.juot.net/forums/showthread.php?t=59842

BirdOPrey5 12-10-2012 07:36 PM

Updated to Version 2.1.0.

Added support for Amazon.uk and Amazon.de in addition to Amazon.com.

Notes:

When using one of the international sites it is suggested you edit the "Post Template" setting in the mod settings.

The UK version does not have kids/teens deals, but they do have 2 (or more) daily deals. Only the first 2 are supported.

For the UK I suggest using this post template:

Code:

[B][SIZE=3]Kindle Daily Deal for {DATE}[/SIZE][/B]

[B][I][URL="{LINK}"]{TITLE}[/URL][/I][/B]

[URL="{LINK}"][img]https://vborg.vbsupport.ru/[/img][/URL]

[B]About:[/B] {SHORTDESC}

[B]Deal Price: {DEALPRICE}[/B] (Today Only) ({DISCOUNT} Off)

[B][SIZE=3]Deal # 2[/SIZE][/B]

[B][I][URL="{LINK}"]{ALT_TITLE}[/URL][/I][/B]

[URL="{LINK}"][img]https://vborg.vbsupport.ru/[/img][/URL]

[B]About:[/B] {ALT_SHORTDESC}

[B]Deal Price: {ALT_DEALPRICE}[/B] (Today Only) ({ALT_DISCOUNT} Off)


[B][URL="{LINK}"]View All Deals Now[/URL][/B] or [URL="{ALINK}"]Browse Amazon.uk[/URL].



The German site does only 1 daily deal, there is usually not a second deal so for that site I suggest using this post template (Better German translations would be appreciated- I translated with Google):

Code:

[B][SIZE=3]Kindle-Deal des Tages: {DATE}[/SIZE][/B]

[B][I][URL="{LINK}"]{TITLE}[/URL][/I][/B]

[URL="{LINK}"][img]https://vborg.vbsupport.ru/[/img][/URL]

[B]Umschreibung:[/B] {SHORTDESC}

[B]Heutigen Preis: {DEALPRICE}[/B] (Nur Heute) ({DISCOUNT} reduziert)

[B][URL="{LINK}"]Jetzt Ansehen[/URL][/B] or [URL="{ALINK}"]Bl?ttern Amazon.de[/URL].


Shogo 12-10-2012 09:39 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2389838)
Most of those sites I believe have RSS feeds which are easier and less work to setup.

For example I have an RSS feed from woot.com on my forum: http://www.juot.net/forums/showthread.php?t=59842


Did you published this "rss bot" ?

imported_stefan 12-10-2012 11:18 PM

I suggest:

Code:

Kindle-Deal des Tages: Datum: {DATE}

{TITLE}

https://vborg.vbsupport.ru/

Beschreibung: {SHORTDESC}

Heutige Ersparnis: {DEALPRICE}

(Nur Heute um ({DISCOUNT} reduziert)

Jetzt Ansehen oder bei Amazon.de bl?ttern.

and for the title

Code:

{TITLE}: Kindles t?glicher Deal vom {DATE}.
Working Example: http://forum.adeba.de/sparen-gratis-...ebote-rabatte/

Thanks a lot for your work. If its works I will be glad to donate or buy something from you.

imported_stefan 12-10-2012 11:23 PM

DEALPRICE ist the ammount which you savetoday and not the product price by the way.

BirdOPrey5 12-11-2012 07:51 AM

Quote:

Originally Posted by Shogo (Post 2389876)
Did you published this "rss bot" ?

vBulletin has RSS Importing built in. In the Admin CP -> RSS Feeds... Just find an RSS feed for those sites and you can setup vBulletin to import from them.

Quote:

Originally Posted by imported_stefan (Post 2389904)
I suggest:

Working Example: http://forum.adeba.de/sparen-gratis-...ebote-rabatte/

Thanks a lot for your work. If its works I will be glad to donate or buy something from you.

Thanks... Donations are always appreciated and can be made by the "Support Developer" link in the top post. :)

Quote:

Originally Posted by imported_stefan (Post 2389908)
DEALPRICE ist the ammount which you savetoday and not the product price by the way.

Whoops, you are correct. Will issue an update shortly.

BirdOPrey5 12-11-2012 08:09 AM

Updated to version 2.1.1.

Fixes bug where German mode pulls in the wrong price for {DEALPRICE}.

synseal 12-11-2012 01:14 PM

Excellent as always - working example http://www.techkings.org/ebooks/

I set it to make new threads each day and made a kindle bot as per your example.

Very nice thank you!.

Mr_Running 12-12-2012 11:27 AM

Installed and testing. :)
I'm wondering if the forum/thread/post needs to be public?
Will it work if the forum requires to be a logged in to view? be a member? usergroups?

BirdOPrey5 12-12-2012 11:45 AM

Forum can be private, not a problem.

The only thing is the user you assign to make the post in settings needs permission to post in whatever forum you are posting it to.

Mr_Running 12-12-2012 12:07 PM

Thanks, Worked just moments ago :)
One thing...the title is displaying html code

[HTML]Kindle Daily Deal for 12-12-2012[B][I][URL="http://www.amazon.com ..........[/HTML]

Also, Do I need to change the User Title Maximum Characters?

BirdOPrey5 12-12-2012 12:15 PM

What do you have for your title in the settings?

The default is:

Code:

Kindle Daily Deals: {TITLE} - {DATE}
I suppose if you use a field with BBCode in it (like {SHORTDESC}) you would see BBCode.

User Title is the word below your username ("Member" on this site) so that has nothing to do with this mod.

If you mean the thread title (or post title) max length, that is up to you, it will just cut off anything beyond the max length you have set.

Mr_Running 12-12-2012 12:45 PM

1 Attachment(s)
This is what I have as default...

HTML Code:

[B][SIZE=3]Kindle Daily Deal for {DATE}[/SIZE][/B]

[B][I][URL="{LINK}"]{TITLE}[/URL][/I][/B]

edit update: Sorry, this is actually part of the Title of the Post Template
By the way...What I have is one thread with a daily post.

BirdOPrey5 12-12-2012 05:50 PM

What do you have in the box Thread / Post Title in settings because that looks like where the problem is from your screen shot. Like perhaps you posted in the Template code into the title accidentally.

If you can't see the problem, uninstall the mod and re install. Don't make any changes to the post template or title settings and manually run the task.

If still problem please post a screen shot of the entire post.

Mr_Running 12-12-2012 06:52 PM

Yeah, this was in the Thread / Post Title

HTML Code:

[B][SIZE=3]Kindle Daily Deal for {DATE}[/SIZE][/B][B][I][URL="{LINK}"]{TITLE}[/URL][/I][/B][URL="{LINK}"][img]https://vborg.vbsupport.ru/[/img][/URL][B]About:[/B] {SHORTDESC}[B]Deal Price: {DEALPRICE}[/B] (Today Only) ({DISCOUNT} Off)[B][URL="{LINK}"]View Deals Now[/URL][/B] or [URL="{ALINK}"]Browse Amazon.com[/URL].

Thread / Post Title now is this.... :D
Code:

Kindle Daily Deals: {TITLE} - {DATE}


All times are GMT. The time now is 07:04 PM.

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.01501 seconds
  • Memory Usage 1,841KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_html_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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