Taobaoke is based on TaoKe API provides by Taobao(Largest c2c website of China) Open Platform(TOP). This module can help you build a taoke website.
Features:
- Get item informations from taobao.com by category
- Show items by category
- Create blocks by category
- Show items detail info
Project page:
http://drupal.org/sandbox/lugir/1170452
Git repository:
# For Drupal 6
git clone http://git.drupal.org/sandbox/lugir/1170452.git -b 6.x-1.x taobaoke
# For Drupal 7
git clone http://git.drupal.org/sandbox/lugir/1170452.git -b 7.x-1.x taobaoke
This module is for Drupal 6 & Drupal 7
To try this module out, please download library and use following test config in admin/config/taobaoke
Download TopSDK: http://lugir.com/sites/default/files/taobao-sdk-php-taobaoke.zip
Test Configuration Info
Test AppKey: 12547279
Test AppSecret: 3120c80bf6424d05197481f2c0bc1597
Test Nick: lugir
Comments
Comment #1
lugir commentedProject page is : http://drupal.org/sandbox/lugir/1170452
Comment #2
aspilicious commentedDon't put chinese or whateva it is in your code :)
* 通过传入的数组数据,请求淘宝客内容列表 is not rly readable for must of us :)
Comment #3
lugir commentedHave updated the code, removed Chinese and use English instead :D
Comment #4
lugir commentedneeds review :D
Comment #5
svendecabooterMarking as critical as per http://drupal.org/node/894256
Sorry for the long wait.
Comment #6
tr commentedI can't really test the functionality of the code because I don't have an API key for that web service, but there are a number of problems that I found with the code in the repository.
First and foremost, it looks like you're including a 3rd-party library in your repository (in the directory topsdk). This is not allowed. If the module needs to use 3rd-party code then you should have instructions in your README.txt or INSTALL.txt telling the user where to download the 3rd-party code and how to install it.
Other problems, in no specific order:
In hook_menu(), you should not use t() around the menu title and description.
In hook_perm(), you should not use t() around the permission name. The permission name should be all lower-case letters.
You need to remove all the CVS $Id$ tags from your code.
Installing and running the Coder module will help you find these things and help you bring your code up to Drupal coding standards http://drupal.org/coding-standards .
Repository should not contain .project
Translations are no longer distributed with modules - you should remove your translations directory from the repository.
theme/theme.inc doesn't have any functioning code. It should be removed, and references to it in hook_theme() should be removed.
theme/taobaoke_block doesn't seem to be used either. If it is, it should have a proper file extension.
Are the images in images/ made by you? If not, are they licensed GPL and do you have permission to redistributed them?
Comment #7
lugir commentedUPDATE:
1. removed directory topsdk, add an INSTALL file to instraction where to download this 3rd-party library
2. removed t() from hook_perm() and hook_menu(). If i shouldn't use t() around menu title and description, when people want translate this string, what would they do?
3. removed all CVS $id$ tags from code
4. installed coder module and fix all problem
5. removed .project folder which created by eclipse
6. removed translations folder. How could i provide translations?
7. removed theme/theme.inc and theme/taobaoke_block, removed references to theme/theme.inc in hook_theme()
8. all images in images are made by me, i have permission to distributed them
Comment #8
aspilicious commented2) Happens automaticly (core handles it)
6) point them to localize.drupal.org and add strings there yourself
You still have some functions without any comments on top of it.
You need to fix that. Code module doesn't find everything :)
Comment #9
lugir commentedAdded comments to all functions :D
Comment #10
lugir commentedWhen will this module can turn to a full project?
we have been used this module on http://www.9idaban.com/shop for a couple of month
Needs review.
Thanks
Comment #11
tr commentedThere are still a bunch of coding standards issues in the module. I guess that's not enough to hold this up, but you really should read the coding standards document cited above and try to make your code comply with Drupal standards. I see indentation problems, trailing whitespace, missing function documentation, commented-out debugging code, etc.
Other problems:
In your .module file, you have a whole bunch of code not contained in functions. This should not be there. The check for the TopSdk.php library should be done in hook_requirements() in your .install, not here. Likewise, your module CSS should be loaded in hook_init().
But the biggest problem I see is how you handle your system variables. You have implemented your own variable saving and storing mechanism for your "settings". You can eliminate > 100 lines of code, plus make your module easier to understand for people who know the Drupal APIs, if you simply use system_settings_form() in your taobaoke_settings_form(). To do this, you return system_settings_form($form) instead of just $form at the end of your function, and the variables will be automatically created and set based on the values in the submitted form.
Comment #12
gregglesMarking needs work for:
The rest of TR's review is strongly advised but not as critical.
Comment #13
lugir commentedThanks for all your kind reviews.
There is a lot of updates for this module:
Comment #14
patrickd commentedYou still have some coding style issues (http://ventral.org/pareview/httpgitdrupalorgsandboxlugir1170452git, you can use this site to re-test it your self).
If you got any questions on this please ask!
Comment #15
raynimmo commentedChanged priority from 'major' to 'normal'.
Your priority should not be at 'major' it should only be at 'normal'. The former setting is only for projects that have been awaiting review for 2 weeks or more in line with the project review guidelines.
Comment #16
lugir commentedHi
I've fixed all code standard issues, and repeat review on http://ventral.org/pareview/httpgitdrupalorgsandboxlugir1170452git
It's pretty good now :)
Thanks
Comment #17
jthorson commentedIt appears that there have been multiple project applications opened under your username:
Taobaoke: http://drupal.org/node/1176740
ImageLink: http://drupal.org/node/1275104
Comment Name: http://drupal.org/node/1242806
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue.
With this in mind, I have marked your secondary applications as 'closed(duplicate)', and left one application open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one I that I have left open, then please feel free to close the 'open' application as a duplicate, and re-open one of the other project applications which I had closed.
Thanks in advance for your patience and understanding!
Comment #17.0
jthorson commentedadd some description of this module, add git repository link and specify this module is for drupal 6
Comment #18
lugir commentedThanks jthorson, Taobaoke is the main project of mine, and I'd like use this module to go through module approve process.
Comment #19
rogical commentedComment #20
firebird commentedI've reviewed the module, here's what I think:
Licensing: No issues found. It looks like there is no 3rd party code.
Module duplication: There are no other modules at drupal.org that integrate with the service in question.
Overall understanding of Drupal API's: Looks good to me.
Security: Nothing major found. I think it might be a good idea a pass the content received from the external XML API through check_plain() or check_markup() before printing?
Drupal coding standards: Just a few missing file-ending-newlines, according to PAReview: http://ventral.org/pareview/httpgitdrupalorgsandboxlugir1170452git
Code documentation: Not a huge amount of comments in the code, but it seems easy enough to understand.
Now, working with the project application reviews is a new thing for me, so if there's any feedback about how this should work, feel free to review my review... ;)
Comment #21
xenophyle commentedI am reviewing this module now.
Comment #22
xenophyle commentedThis review is for the D7 version.
The file documentation for the install file should be
/**
* @file
* Install, update, and uninstall functions for the Taobaoke module.
*/
taobaoke.module
Instead of using taobaoke_init(), you can put this line in your info file if you want the CSS on every page:
stylesheets[all][] = css/taobaoke.css
In taobaoke_load_sdk(), you might consider using the library API module if you want to be more Drupalish
Project page: http://drupal.org/project/libraries
Documentation: http://drupal.org/node/735160
In Drupal 7 there is no hook_perm, instead use hook_permission: http://api.drupal.org/api/drupal/modules!system!system.api.php/function/...
In taobaoke_theme() it looks like taobaoke_items_list is not used and should be removed.
The shop paths might clash with the paths of other modules, since "shop" is go generic. You might change it to "taobaoke-shop" if you think it is likely that a user would have other modules that could also have a "shop" path.
You should remove the commented out code in taobaoke_items_get(). If you want to look at it in the future, you can see it in the git history.
You can make it a little easier for users to find the configuration page by adding this to the .info file:
configure = admin/config/taobaoke
This will add a link on the module overview page.
Comment #23
Drupals commentedWe are trying to use your module for Drupal-7 already more then 1 month on our web http://tao-market.com . All we succeed in this is: for each category it can create a block and a parsing page for this block from TaoBao.com . The problem is that only one page is parsed ... And that link goes immediately to the Commodity TaoBao on Taobao.com - but not on our website!
Also, we did not find any instructions on how to fill in the fields in the module .. That is a big part of fields which are not used and we not understand how to fill them ... At least one error is made and the website falls entirely (for example, we want to add more pages for one group of items (page is 0 now), and if you put 5 in this field "page" - the site is completely falls and we have to download the dbase dump again ... and again ...
Also, we have not found where we can download your module for Drupal 6 ..
In general, every day for many hours our team of programmers 7 people, including two people of Chinese nationality is trying in vain to understand how to work with this module ... But as long as in Drupal there is nothing else better, we have to suffer every day in search of truth ... Please help us with instructions for configuring your Taobaoke module and give us the link for it for Drupal 6.
Comment #24
patrickd commentedThis issue is only about the project application.
Please create a new issue.
Comment #25
lugir commentedThanks for your advises, I've implemented following updates:
taobaoke.module
taobaoke.info
taobaoke.install
Taobao has limited which is not allowed callback URL including string like 'taobao, tmall, yahoo, alibaba, hitao, koubei', so this module will keep using /shop for now, I will update it when a better name came out.
Comment #26
patrickd commentedComment #27
patrickd commentedSet the appropriate default branch: http://drupal.org/node/1659588
Delete the master branch:
Your installation is not very complex, you can simply put it into the readme.
It's not recommended and also really not necessary to set default values on hook_install().
Please rather make use of the second parameter of variable_get() - that's absolutely enough!
Please do not break and indent translatable strings in-line. This will make the translation horribly difficult.
$message = $missing_top_sdk;Try not to waste memory by defining same variables multiple times (without reason)
Why do you do this in hook_init() ? this is a waste of performance, just add your css directly in the page callbacks where necessary.
Still some coding style issues, you may at least remove these hundreds of whitespaces?
http://ventral.org/pareview/httpgitdrupalorgsandboxlugir1170452git
$library['error message']I couldn't find any documentation about libraries_load() returning an error message, is there any?
t('#!index', array('!index' => $delta + 1)))Don't try to translate non-human-readable-non-translatable text.
Rather than unset() form items, use hide() to hide them.
there are a couple of other issues but I'll stop at this point for today.
Comment #27.0
patrickd commentedChange git repository for both Drupal 6 and Drupal 7
Comment #28
lugir commentedUpdate log:
Comment #29
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
If you reopen this please keep in mind that we are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #29.0
klausiAdd test configuration info.
Comment #30
avpaderno