PDA

View Full Version : SUGGESTIONS on NEW PRODUCTS


seangworld
10-18-2008, 06:52 AM
yo i been lookin around EVERYWHERE for a decent script to use and they are either over-priced or a piece of crap. so here's my suggestion:

1. a classified ad script - to have our own classified ad site - unlimited categories, locations, worldwide, seller rating/feedback, etc. I know there's a couple other people that had one for vb but they're idiots, imo.

2. auctions. same as above.

PhilMcKrackon
10-18-2008, 09:44 AM
yo i been lookin around EVERYWHERE for a decent script to use and they are either over-priced or a piece of crap. so here's my suggestion:

1. a classified ad script - to have our own classified ad site - unlimited categories, locations, worldwide, seller rating/feedback, etc. I know there's a couple other people that had one for vb but they're idiots, imo.

2. auctions. same as above.I use the classified script VbClassified from www.VbClassified.com

It has auctions, unlimited cats, feedback and more. I would hardly call Quarterbore and idiot either...

Our Sponsors
 

cbp
10-18-2008, 07:57 PM
vBClassified is awesome - it costs, but it not close to being overpriced and does everything you are asking for.

Ditto: Quarterbore is NOT an idiot

ge66
10-18-2008, 08:44 PM
I own a vbclassified licens, but I am using vBadvanced Dynamics as a classifieds-script. It is working well, of course some things could be improved. But it was the best script I could find for my needs at the time, almost a year ago.

I do believe that Brian needs to help people understand just what you can do with vBadvanced Dynamics.

About 60000 classifieds have been placed in the system in less than a year. About half of them have been soft-deleted by the users.
One of the things I would need in the script is an automatic deletion av ads older than say 3 months.

Our Sponsors
 

KW802
10-18-2008, 10:29 PM
I do believe that Brian needs to help people understand just what you can do with vBadvanced Dynamics.I'd have to agree with that statement. Dynamics is so versatile that sometimes it is hard to define what exactly the product is & it is capable of.

One of the things I would need in the script is an automatic deletion av ads older than say 3 months.HHhmm.... I would think that something could be whipped up to run via a cron job. When you cleanup, is it just a matter of deleting a Dynamics entry or is there more to it?

ge66
10-19-2008, 05:25 AM
Yes, the entry and even more important every attachment for that entry. It probably would not be to hard to fix if one know how to do it ;)

Another thing similar, but not as important, is to be able to delete entries that that already have been soft deleted.

Brian
10-20-2008, 12:28 PM
Simple code for a cron job to delete entries older than X days:
require_once('./includes/vba_dyna_functions_moderate.php');

$killentries = array();
$getentries = $db->query_read("
SELECT entryid
FROM " . TABLE_PREFIX . "adv_dyna_entries
WHERE dateline < " . TIMENOW - (86400 * 60)
);
while ($entry = $db->fetch_array($getentries))
{
$killentries[] = $entry['entryid'];
}

if (!empty($killentries))
{
delete_entries($killentries);
}

Change the number 60 there to the number of days after which you wish entries to be deleted. Also note that is completely un-tested, but should work.


We will likely be adding in better options for deleted entry/post management (like you see in vBa Links 3.0.0) in a future version.

KW802
10-20-2008, 12:47 PM
Simple code for a cron job to delete entries older than X days::cool:

Just to add a minor comment... ge66, if you are using multiple Dynamics installations then be sure to take into account your table name as well instead of the default "dyna" in the query.

ge66
10-21-2008, 08:12 PM
Thank you for this! I will try it soon.
Will this delete corresponding attachments in the file-system?

KW802
10-21-2008, 08:38 PM
Thank you for this! I will try it soon.
Will this delete corresponding attachments in the file-system?It should since it is using the moderator functions, meaning that it is the same as if somebody manually deleted the entry.

ge66
10-22-2008, 11:47 PM
I have tried to get this to work, have got different error messages. I have then tried to change some of the things. But have then got new errors. I am not sure what I am doing here ;)

The last one I got was this one:
Fatal error: Call to a member function query_write() on a non-object in /some/path/to/forum/includes/vba_dyna_functions_moderate.php on line 156

That was with the following php-file:

<?php
require_once('./includes/vba_dyna_functions_moderate.php');

$killentries = array();
$getentries = $vbulletin->db->query_read("
SELECT entryid
FROM " . TABLE_PREFIX . "adv_dyna_entries
WHERE dateline < " . (TIMENOW - (86400 * 60))
);
while ($entry = $vbulletin->db->fetch_array($getentries))
{
$killentries[] = $entry['entryid'];
}

if (!empty($killentries))
{
delete_entries($killentries);
}
?>

having $db-> instead of $vbulletin->db-> gave other errors

Brian
10-23-2008, 10:01 AM
I always tend to forget those variables are not available in cron jobs. I did some testing locally and was able to run the following code with no issues, so this should work for you as well.
<?php
require_once('./includes/vba_dyna_functions.php');
require_once('./includes/vba_dyna_functions_moderate.php');

$db =& $vbulletin->db;

define('ADV_DYNA_PREFIX', 'adv_dyna');
define('ADV_DYNA_TABLE_PREFIX', TABLE_PREFIX . ADV_DYNA_PREFIX . '_');

$killentries = array();
$getentries = $db->query_read("
SELECT entryid
FROM " . ADV_DYNA_TABLE_PREFIX . "entries
WHERE dateline < " . (TIMENOW - (86400 * 60))
);
while ($entry = $db->fetch_array($getentries))
{
$killentries[] = $entry['entryid'];
}

if (!empty($killentries))
{
delete_entries($killentries);
}

require_once('./includes/vba_dyna_functions_savecat.php');
update_count();

?>

ge66
10-23-2008, 10:53 AM
Thank you!
That seems to be working just fine.

A small question is i possible to do a soft delete instead.
I was thinking of soft delete first say older than 60 days and maybe hard delete after 180 days.
If it takes a lot of thought, forget about for now ;)

Brian
10-23-2008, 11:27 AM
Shouldn't be too hard... Code is un-tested again, so use at your own risk. ;)

<?php
require_once('./includes/vba_dyna_functions.php');
require_once('./includes/vba_dyna_functions_moderate.php');

$db =& $vbulletin->db;

define('ADV_DYNA_PREFIX', 'adv_dyna');
define('ADV_DYNA_TABLE_PREFIX', TABLE_PREFIX . ADV_DYNA_PREFIX . '_');

$softcut = TIMENOW - (86400 * 60);

$softkill = array();
$killentries = array();
$getentries = $db->query_read("
SELECT entryid, dateline
FROM " . ADV_DYNA_TABLE_PREFIX . "entries
WHERE dateline < " . (TIMENOW - (86400 * 180))
);
while ($entry = $db->fetch_array($getentries))
{
if ($entry['dateline'] > $softcut)
{
$softkill[] = $entry['entryid'];
}
else
{
$killentries[] = $entry['entryid'];
}
}

if (!empty($softkill))
{
$db->query_write("UPDATE " . ADV_DYNA_TABLE_PREFIX . "entries SET valid = 2 WHERE entryid IN(" . implode(', ', $softkill) . ")");
}

if (!empty($killentries))
{
delete_entries($killentries);
}

require_once('./includes/vba_dyna_functions_savecat.php');
update_count();

?>

Just to make sure they are obvious, the 60/180 day limits in the code are marked in red.

ge66
10-23-2008, 02:32 PM
Not only Dynamics is fantastic the support is to :)
There is something in there not working it i not soft deleting anything, I changed the this line $softcut = TIMENOW - (86400 * 60); I think it was missing a 4.
I get no errors, hard delete are working but not soft. Cold it have something to do with who is the deletetor.

Brian
10-24-2008, 01:18 PM
At least I did warn that it was untested. :p
Yes, 8600 in the code above should be 86400. I would think that is what's causing the issue with the entries not being soft deleted, but if you still have problems after making that change let me know.

ge66
10-24-2008, 07:52 PM
I changed that before trying :), so something else seemes to be wrong.

seangworld
12-04-2008, 02:04 AM
i'd like to see other examples of uses and possibilities than what's shared on the main site for dynamics.

as far as vbclassified, it's crap.

i want something, for classifieds, that i'll be able to view the categories like if i was looking at craigslist, but my own, for example.