vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - Mary's Classifieds (https://vborg.vbsupport.ru/showthread.php?t=267194)

maineGuy72 09-16-2011 02:31 PM

Quote:

Originally Posted by ChrisTERiS (Post 2246751)
Hello Mike,

As I don't have any installation with this version to check it, please do it for me. I did some changes in Bids, Contact Seller and Email to Friend.

Chris

yes it worked

qpurser 09-16-2011 02:35 PM

Quote:

Originally Posted by ChrisTERiS (Post 2246770)
I assume that:
1.- You're not getting any database errors
2.- That "Value as Buyer" and "Value as Seller" at the top are not zero.
Ok?
Also Seller reviews appear or not?

Chris

1. No DB errors
2. They are not zero and every time I do a test sale or buy the star rating gets updated accordingly
3. seller AND buyer reviews still not showing

Christos Teriakis 09-16-2011 02:39 PM

Quote:

Originally Posted by maineGuy72 (Post 2246773)
yes it worked

Good to know. Now let's try to help qpuser as he is ready to start ....crying:D

Thank you Mike
Chris

qpurser 09-16-2011 02:47 PM

Quote:

Originally Posted by ChrisTERiS (Post 2246779)
Good to know. Now let's try to help qpuser as he is ready to start ....crying:D

Thank you Mike
Chris

lol...Good to see you didn't gave up your humor :)
I am sure you will get it to work and mike Michael happy

maineGuy72 09-16-2011 02:53 PM

Quote:

Originally Posted by ChrisTERiS (Post 2246779)
Good to know. Now let's try to help qpuser as he is ready to start ....crying:D

Thank you Mike
Chris

the only thing i can think of is its not pulling the id correctly like it was doing with the PM to people watching the ad.

Christos Teriakis 09-16-2011 03:01 PM

Quote:

Originally Posted by qpurser (Post 2246783)
lol...Good to see you didn't gave up your humor :)
I am sure you will get it to work and mike Michael happy

Do you know about the nervous laughing?? .... This is how I'm right now. I don't believe what childish error is, but because is also normal mysql syntax, it does not produces any error.

When I'll be able to stop laughing, I'll correct it :D

Chris

Christos Teriakis 09-16-2011 03:12 PM

Quote:

Originally Posted by maineGuy72 (Post 2246789)
the only thing i can think of is its not pulling the id correctly like it was doing with the PM to people watching the ad.

No... It's very difficult to find it:
1.- Because the syntax is 100% correct
2.- It's childish error even for novice coders:eek:

Well, the error is that is not really runing the query. Just adds the query in a variable. It says:
Code:

$sellerwhois_sql = "SELECT * FROM ".TABLE_PREFIX."microclassifieds_orders WHERE sellerid=$userid AND showrating=1 ORDER BY sreviewdate DESC";
which is 100% correct if you want to store the query in a variable and run it at later time. But if you want to run the query right now the syntax is:
Code:

$sellerwhois_sql = $vbulletin->db->query_read("SELECT * FROM ".TABLE_PREFIX."microclassifieds_orders WHERE sellerid=$userid AND showrating=1 ORDER BY sreviewdate DESC");
So simple..............

qpurser 09-16-2011 03:13 PM

Quote:

Originally Posted by ChrisTERiS (Post 2246798)
Do you know about the nervous laughing?? .... This is how I'm right now. I don't believe what childish error is, but because is also normal mysql syntax, it does not produces any error.

When I'll be able to stop laughing, I'll correct it :D

Chris

It is just weird the star rating is getting updated perfectly but not the reviews when they are stored in the DB (and yes they get stored. I saw them)
And it has nothing to do with the cron job?
Only thing I could find in there was about the rating but not about the reviews:
// Calculate the allowed time for rating
$maxdays = $vbulletin->options["microclassifieds_rating_limit"];
$timenow = time();
$timelimit = $timenow - ($maxdays * 86400);
// Update records for selldate >= timelimit
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."microclassifieds_orders SET allowrating=0, showrating=1 WHERE selldate<=$timelimit");
// Also update records where Seller and Buyer have rate each other, even if timelimit hasn't expired
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."microclassifieds_orders SET allowrating=0, showrating=1 WHERE breviewrating>0 AND sreviewrating>0");

Christos Teriakis 09-16-2011 03:14 PM

Quote:

Originally Posted by qpurser (Post 2246783)
lol...Good to see you didn't gave up your humor :)
I am sure you will get it to work and mike Michael happy

Can you try this file? Don't need to add new sales etc. Try with old ones.

Chris

Christos Teriakis 09-16-2011 03:15 PM

Quote:

Originally Posted by qpurser (Post 2246806)
It is just weird the star rating is getting updated perfectly but not the reviews when they are stored in the DB (and yes they get stored. I saw them)
And it has nothing to do with the cron job?
Only thing I could find in there was about the rating but not about the reviews:
// Calculate the allowed time for rating
$maxdays = $vbulletin->options["microclassifieds_rating_limit"];
$timenow = time();
$timelimit = $timenow - ($maxdays * 86400);
// Update records for selldate >= timelimit
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."microclassifieds_orders SET allowrating=0, showrating=1 WHERE selldate<=$timelimit");
// Also update records where Seller and Buyer have rate each other, even if timelimit hasn't expired
$vbulletin->db->query_write("UPDATE ".TABLE_PREFIX."microclassifieds_orders SET allowrating=0, showrating=1 WHERE breviewrating>0 AND sreviewrating>0");

I've corrected it already. Is on the version that I'll release right now if you say me that the reviews are working.

Chris


All times are GMT. The time now is 05:09 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.02378 seconds
  • Memory Usage 1,757KB
  • 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
  • (2)bbcode_code_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (5)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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