PDA

View Full Version : This is a nightmare.......


Doug B
11-22-2006, 10:22 PM
Ok I am confused....

Im trying to set up my listings but they just dont seem to work right, plus as I have no written instructions on how to use this directory software I am starting to struggle.

If someone adds their site to my directory (Plan 1 - free listing with recipricol link) they should get a standard listing (no banner, not appearing at top). - this seems to be working.

If they pay for plan 2, they should get same as above but NOT need to add recipricol link - this seems to work but new listings always show as 'suspended' in my admin panel?

if they pay (plan 3) they get above + they can have a banner at top of their chosen catagory and appear at the top of their listings - not working it keeps asking for recipricol link.

I have set these up as 'plans' withing my admin area, but do I need to modify code, if so where/how please.

Also how will I be able to destiguish between plan 2 and 3 from within my admin panel once they have submitted their site (both plans 2 & 3 will be under 'sponsored'. How will I which they chose?)

Am I missing something?

Dave Baker
11-23-2006, 10:13 PM
Please visit:
http://www.esyndicat.com/forum/about7665.html
http://www.esyndicat.com/forum/about7734.html
If they pay for plan 2, they should get same as above but NOT need to add recipricol link - this seems to work but new listings always show as 'suspended' in my admin panel?
***Open suggest-link.php and around 479 line find code***


$link['status'] = $_POST['plan'] ? 'suspended' : 'approval'; $link['status'] = ($gDirConfig['auto_approval'] && ('approval' == $link['status'])) ? 'active' : $link['status'];

***Replace with similar code***

$link['status'] = ($_POST['plan'] && $_POST['plan']!=2) ? 'suspended' : 'approval'; $link['status'] = ($gDirConfig['auto_approval'] && ('approval' == $link['status'])) ? 'active' : $link['status'];

***Save file***
2 - ID of your "plan 2" plan. Check it in database table yourPrefix_plans.

Also how will I be able to destiguish between plan 2 and 3 from within my admin panel once they have submitted their site (both plans 2 & 3 will be under 'sponsored'. How will I which they chose?)

It is problem of the script. Correction below follows:
***Open suggest-link.php and find code ***

if (!$error)
{
$_SESSION['pass'] = '';
$plan = $_POST['plan'] ? $gDirDb->getSponsoredPlanById($_POST['plan']) : '';
$gDirSmarty->assign('plan', $plan);
$msg = $gDirLang['submission_confirmation'];

if ($_POST['action'] == 'add')
{
$link['status'] = ($_POST['plan']|| $link['id']!=1) ? 'suspended' : 'approval';
$link['status'] = ($gDirConfig['auto_approval'] && ('approval' == $link['status'])) ? 'active' : $link['status'];

$tmp['id'] = $gDirDb->addLink($link);
$msg = $gDirLang['link_submitted'];
}
}

***Replace with following***

if (!$error)
{
$_SESSION['pass'] = '';
$plan = $_POST['plan'] ? $gDirDb->getSponsoredPlanById($_POST['plan']) : '';
$gDirSmarty->assign('plan', $plan);
$msg = $gDirLang['submission_confirmation'];

if ($_POST['action'] == 'add')
{
$link['status'] = $_POST['plan'] ? 'suspended' : 'approval';
if ($_POST['plan'])
{
$link['sponsored'] = 1;
$link['sponsored_plan_id'] = $_POST['plan'];
}

$link['status'] = ($gDirConfig['auto_approval'] && ('approval' == $link['status'])) ? 'active' : $link['status'];

$tmp['id'] = $gDirDb->addLink($link);
$msg = $gDirLang['link_submitted'];
}
}

***Save file***
One more problem connected to appointment of the status "suspended" in Manage Sponsored Listings
***Open admin/manage-links.php and find following code arround line 103***

elseif ($_POST['change_status'] == 'ban') {
foreach($_POST['links'] as $key=>$value) {
$gAdminDb->updateLinkStatus($value, 'banned');
}
$msg = $gDirLang['changes_saved'];
}

***Below this code add***

elseif ($_POST['change_status'] == 'suspend') {
foreach($_POST['links'] as $key=>$value) {
$gAdminDb->updateLinkStatus($value, 'suspended');
}
$msg = $gDirLang['changes_saved'];
}

***Save file***

Doug B
11-24-2006, 11:09 PM
Hi Dave, both sponsered plans are still showing up as being suspended even after this mod..... :blink:

Dave Baker
11-25-2006, 07:18 PM
If I correctly understand, according to this post:
http://www.esyndicat.com/forum/post52698-11.html
Your sponsored have ids 3 and 4, and your code should correspond to the following:

$link['status'] = ($_POST['plan'] && $_POST['plan']!=3 && $_POST['plan']!=4) ? 'suspended' : 'approval'; $link['status'] = ($gDirConfig['auto_approval'] && ('approval' == $link['status'])) ? 'active' : $link['status'];


But "suspended" is intended for storage of links before confirmation of payment. In your case link will be "sponsored" without check of payment.

Doug B
11-27-2006, 11:44 AM
Ah...... I wish I was aware of that 1st....

So now I have no way of knowing if the listing is sponsored or not as they will all show as 'approval' in my admin panel :wallbash:

Is there a way that I can be notified either via email or via my control panel as to which they have signed up for? Free, paid 1 or paid 2?

Gonna be a nightmare otherwise :eek:

Dave Baker
11-29-2006, 04:35 PM
If you have made this modification completely:
http://www.esyndicat.com/forum/post52730-2.html
Number of the plan will show at move over of cursor on link in
Admin Panel » Manage Listings/Suspended Listings/Sponsored Listings