Links added by admin with Reciprocal enabled - eSyndiCat User Forums
eSyndiCat User Forums esyndicat directory software esyndicat support

Go Back   eSyndiCat User Forums > eSyndiCat Directory Software [FREE] > Common Questions

Common Questions Latest releases, patches, bugfixes and changes in eSyndiCat Directory Software free version. Feel really frustrated after having spent several hours trying to figure out what went wrong with your directory? Wait no more! Click the link above and post your issues. Right here. Right now.

Reply
 
Thread Tools Display Modes
Old 12-19-2005   #1
softstor
 
Join Date: Dec 2005
Posts: 9
softstor
Default Links added by admin with Reciprocal enabled

I have the Reciprocal Links option enabled. But when the admin user attempts to add a link, the script requires a reciprocal link. Is it possible for the admin user to add a link with the reciprocal link field blank?
softstor is offline   Reply With Quote
Old 12-19-2005   #2
echopulse
 
Join Date: Sep 2005
Posts: 370
echopulse has disabled reputation
Default

Yes it is. You can do it in the admin panel.
echopulse is offline   Reply With Quote
Old 12-19-2005   #3
softstor
 
Join Date: Dec 2005
Posts: 9
softstor
Default

When I try this in the admin I receive the following error message in a big red box:

No reciprocal Link

The link is never added. The only way I am able to add the link is to turn off the reciprocal option.
softstor is offline   Reply With Quote
Old 12-19-2005   #4
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,292
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default

Well, you can disable your reciprocal checking directly in file then

*** open admin/suggest-link.php in any plain text editor ***

*** find there the following code ***
Code:
	if ((!isset($link['recip_valid']) || ($link['recip_valid'] == 1)) && (
			($link['link_header'] == 200) || 
			($link['link_header'] == 301) || 
			($link['link_header'] == 302)))
*** change it to the following ***
Code:
	if (($link['link_header'] == 200) || 
			($link['link_header'] == 301) || 
			($link['link_header'] == 302))
*** save changes ***

let me know if there are any problems
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software
Vasily B. is offline   Reply With Quote
Old 12-19-2005   #5
softstor
 
Join Date: Dec 2005
Posts: 9
softstor
Default

Thanks, it works perfectly.
softstor is offline   Reply With Quote
Old 12-20-2005   #6
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,292
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default

Quote:
Originally Posted by softstor
Thanks, it works perfectly.
glad to help you
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software
Vasily B. is offline   Reply With Quote
Old 01-04-2006   #7
Nuad
 
Join Date: Jan 2006
Posts: 28
Nuad has disabled reputation
Default

May you please include this change into the next update?
Nuad is offline   Reply With Quote
Old 01-05-2006   #8
Vasily B.
Administrator
 
Vasily B.'s Avatar
 
Join Date: Sep 2005
Posts: 9,292
Vasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished roadVasily B. is on a distinguished road
Default

np, already done I completely remade our checking section and gave you (eSyndiCat users) more flexibility in checking configuration
__________________
Subrion CMS - free open source php content management system
Business Directory Script - powerful php business directory software, Yellow Pages Script - the most advanced yellow pages php software
Vasily B. is offline   Reply With Quote
Old 10-14-2006   #9
uscasinos
 
Join Date: May 2006
Posts: 55
uscasinos is on a distinguished road
Default

Quote:
Originally Posted by Simon Gooffin
Well, you can disable your reciprocal checking directly in file then

*** open admin/suggest-link.php in any plain text editor ***

*** find there the following code ***
Code:
	if ((!isset($link['recip_valid']) || ($link['recip_valid'] == 1)) && (
			($link['link_header'] == 200) || 
			($link['link_header'] == 301) || 
			($link['link_header'] == 302)))
*** change it to the following ***
let me know if there are any problems
HI:
Simon
Please help me.

I can not find the codes that you said.
The suggest-link script that I used is like this.
How to edit it to make reciprocal link checking disable?

PHP Code:
<?php

require_once('../classes/DirAdmin.php');
require_once(
'util.php');
require_once(
'../includes/pagerank.inc.php');
require_once(
"../language/{$gDirConfig['lang']}.php");

/** get information about parent category **/
$category =& $gAdminDb->getCategoryById($_GET['id']);

/** get extra fields **/
$fields =& $gAdminDb->getLinkFields();

if (
$_POST['add_link'])
{
    
$link['id_editor'] = 0;
    
$link['status'] = $_POST['status'];
    
$link['rank'] = $_POST['rank'];
    
$link['owner'] = '0';
    
    
/** get category id **/
    
$cat_id = ($gDirConfig['categories_list'] && !$_GET['id']) ? $_POST['id_category'] : $_GET['id'];

    
$comment = (get_magic_quotes_gpc()) ? stripslashes($_POST['comment']) : $_POST['comment'];
    
$link['comment'] = addslashes($comment);
    
    if (
$fields)
    {
        foreach(
$fields as $key=>$value)
        {
            
$field_name $value['name'];
            if (
is_array($_POST[$field_name]))
            {
                
$field_value implode(","$_POST[$field_name]);
                
$field_value trim($field_value',');
            }
            else
            {
                
$field_value $_POST[$field_name];
            }

            
/** magic quotes stripping for text and textarea fields **/
            
if (($value['type'] == 'text') || ($value['type'] == 'textarea'))
            {
                
$field_value = (get_magic_quotes_gpc()) ? stripslashes($field_value) : $field_value;
                
$link[$field_name] = addslashes($field_value);
            }
            elseif (
'storage' == $value['type'])
            {
                if (
$_FILES)
                {
                    
$ext substr($_FILES[$field_name]['name'], -3);
                    
$token get_new_token();
                    
$file_name "uploads/{$cat_id}-{$token}.{$ext}";
                    if (
upload($field_name'../'.$file_name))
                    {
                        
$link[$field_name] = $file_name;
                    }
                    else
                    {
                        
$error true;
                        
$msg 'Unknown error during file upload.';
                    }
                }
            }
            else
            {
                
$link[$field_name] = $field_value;
            }
        }
    }

    if (!
$link['description'])
    {
        
$error true;
        
$msg 'Link description field is empty.';
    }

    if (!
$link['title'])
    {
        
$error true;
        
$msg 'Link title field is empty.';
    }

    if (!
$_POST['url'] || ($_POST['url'] == 'http://'))
    {
        
$error true;
        
$msg 'Please input correct URL.';
    }
    else
    {
        
/** get pagerank **/
        
if ($gDirConfig['pagerank'])
        {
            
$link['pagerank'] = getPageRank($_POST['url']);
        }
        
        
/** get domain name **/
        
$link['domain'] = get_domain($_POST['url']);

        
/** check broken url **/
        
$link['link_header'] = 200;
        if (
$gDirConfig['link_check'] && !$gDirConfig['broken_visitors'])
        {
            
$link['link_header'] = get_link_header($_POST['url']);
        
            
$correct_headers explode(','$gDirConfig['http_headers']);
            if (!
in_array($link['link_header'], $correct_headers))
            {
                
$error true;
                
$msg $gDirLang['error_broken_link'];
            }        
        }
    }
    
    
/** check reciprocal link **/
    
if ($gDirConfig['reciprocal_check'] && !$gDirConfig['reciprocal_visitors'])
    {
        if (
$gDirConfig['reciprocal_domain'])
        {
            if (
get_domain($_POST['reciprocal']) != get_domain($_POST['url']))
            {
                
$error true;
                
$msg 'Reciprocal link seems to be placed on different domain.';
            }
        }
        
$link['recip_valid'] = check_reciprocal($_POST['reciprocal']);
        if (!
$link['recip_valid'])
        {
            
$error true;
            
$msg $gDirLang['no_backlink'];
        }
    }

    
/** check duplicate link **/
    
if ($gDirConfig['duplicate_checking'] && !$gDirConfig['duplicate_visitors'])
    {
        
$forcheck = ($gDirConfig['duplicate_domain']) ? $link['domain'] : $_POST['url'];
        if (
$gAdminDb->checkDuplicateLinks($forcheck$gDirConfig['duplicate_domain']))
        {
            
$error true;
            
$msg $gDirLang['error_link_present'];
        }
    }

    if (!
$error)
    {
        
/** get next id **/
        
$link['id'] = $gAdminDb->getNextId('links');

        
$gAdminDb->addLink($link$cat_id$_POST['send_email']);
        
$msg "Link added.";
    }
}

$gTitle 'Suggest Link';
$gCaption 'SUGGEST LINK';
require_once(
'header.php');

print_breadcrumb($category['id'], TRUE);

$type $error 'error' 'notif';
echo 
$msg box($type''$msg) : '';

ob_start();

$cause = ($gDirConfig['categories_list'] && !$_GET['id']) ? "" "?id={$_GET['id']}";
echo 
"<form action=\"suggest-link.php{$cause}\" method=\"post\" enctype=\"multipart/form-data\">";
echo 
'<table cellspacing="0" cellpadding="0" width="100%">';
echo 
'<tr>';
echo 
'<td><strong>Link category:</strong></td>';

if (
$gDirConfig['categories_list'])
{
    
$categories_list $gAdminDb->getCategoriesByParent();

    echo 
'<td>';
    echo 
'<select name="id_category">';
    
    
print_categories_combo(-1$tree$iter$top);
    echo 
$tree;

    echo 
'</select>';
    echo 
'</td>';
}
else
{
    echo 
"<td><strong><a href=\"browse.php?id={$category['id']}\">{$category['title']}</a></strong></td>";
}
echo 
'</tr>';

/** extra fields display **/
if ($fields)
{
    
$cnt 1;
    foreach(
$fields as $key=>$value)
    {
        
$class = ($cnt%2) ? ' class="tr"' '';
        echo 
"<tr{$class}>";
        echo 
"<td><strong>{$gDirLang[$value['name']]}:</strong></td>";
        echo 
'<td>';

        switch (
$value['type'])
        {
            case 
'text':
                
/** define default value **/
                
$temp = ($link[$value['name']]) ? stripslashes($link[$value['name']]) : $value['default'];
                echo 
"<input type=\"text\" name=\"{$value['name']}\" value=\"{$temp}\" size=\"45\"/>";
                break;
            case 
'textarea':
                
/** define default value **/
                
$temp = ($link[$value['name']]) ? stripslashes($link[$value['name']]) : $value['default'];
                echo 
"<textarea name=\"{$value['name']}\" cols=\"53\" rows=\"8\">{$temp}</textarea>";
                break;
            case 
'combo':
                
/** define default value **/
                
$temp = ($_POST[$value['name']]) ? $_POST[$value['name']] : $value['default'];
                
$values explode(',',$value['values']);
                if (
$values)
                {
                    echo 
"<select name=\"{$value['name']}\">";
                    foreach(
$values as $item)
                    {
                        
$selected = ($item == $temp) ? ' selected="selected"' '';
                        echo 
"<option value=\"{$item}\"{$selected}>{$gDirLang[$item]}</option>";
                    }
                    echo 
'</select>';
                }
                break;
            case 
'radio':
                
/** define default value **/
                
$temp = ($_POST[$value['name']]) ? $_POST[$value['name']] : $value['default'];
                
$values explode(',',$value['values']);
                if (
$values)
                {
                    
$cnt count($values);
                    foreach(
$values as $item)
                    {
                        
$i++;
                        
$checked = ($item == $temp) ? ' checked="checked"' '';
                        echo 
"<input type=\"radio\" name=\"{$value['name']}\" id=\"{$value['name']}_{$item}\" value=\"{$item}\" {$checked} />";
                        echo 
"<label for=\"{$value['name']}_{$item}\">{$gDirLang[$item]}</label>";
                        echo (
$i != $cnt) ? ' | ' '';
                    }
                }
                break;
            case 
'checkbox':
                
/** define default value **/
                
if ($_POST[$value['name']])
                {
                    
$default $_POST[$value['name']];
                }
                else
                {
                    
$default explode(','$value['default']);
                }
                
                
$checkboxes explode(',',$value['values']);                
                if (
$checkboxes)
                {
                    
$cnt count($checkboxes);
                    
$i 0;
                    foreach(
$checkboxes as $item)
                    {
                        
$i++;
                        
$checked = (in_array($item$default)) ? ' checked="checked"' '';
                        echo 
"<input type=\"checkbox\" name=\"{$value['name']}[]\" id=\"{$value['name']}_{$item}\" value=\"{$item}\" {$checked} />";
                        echo 
"<label for=\"{$value['name']}_{$item}\">{$gDirLang[$item]}</label>";
                        echo (
$i != $cnt) ? ' | ' '';
                    }
                }
                break;
            case 
'storage':
                echo 
"<input type=\"file\" name=\"{$value['name']}\" id=\"{$value['name']}\" size=\"30\" />";
                break;
        }
        echo 
'</td>';
        echo 
'</tr>';
        
$cnt++;
    }
}
?>
<tr>
    <td class="caption" colspan="2"><strong>ADDITIONAL FIELDS</strong>
</td>
<tr>
    <td><strong>Link status:</strong></td>
    <td>
        <select name="status">
            <option value="approval"<?php echo ($_POST['status'] == 'approval') ? ' selected="selected"' '';?>>Approval</option>
            <option value="banned"<?php echo ($_POST['status'] == 'banned') ? ' selected="selected"' '';?>>Banned</option>
            <option value="active"<?php echo (($_POST['status'] == 'active') || !$_POST) ? ' selected="selected"' '';?>>Active</option>
        </select>
    </td>
</tr>
<tr class="tr">
    <td><strong>Link rank:</strong></td>
    <td>
        <select name="rank">
            <option value="0">Not Ranked</option>
        <?php
            
for($i 1$i <= 10$i++)
            {
                
$selected = ($_POST['rank'] == $i) ? ' selected="selected"' '';
                echo 
"<option value=\"{$i}\"{$selected}>Rank {$i}</option>";
            }
        
?>
        </select>
    </td>
</tr>

<tr>
    <td><strong>Admin comment:</strong></td>
    <td><textarea name="comment" cols="53" rows="8"><?php echo $comment?></textarea></td>
</tr>
<tr class="all">
    <td colspan="2">
        <input type="checkbox" name="send_email" id="send_email"<?php echo $gDirConfig['link_admin_add'] ? ' checked="checked"' ''?> /><label for="send_email">Send email notification</label> | <input type="submit" name="add_link" value="Add link" /></td>
</tr>
</table>
</form>

<?php
$s 
ob_get_clean();
box('box''SUGGEST LINK'$s);

require_once(
'footer.php');
?>
uscasinos is offline   Reply With Quote
Old 10-19-2006   #10
John Turner
 
Join Date: Sep 2006
Posts: 1,428
John Turner is a jewel in the roughJohn Turner is a jewel in the roughJohn Turner is a jewel in the roughJohn Turner is a jewel in the rough
Default

Hi uscasinos,
You may also disable reciprocal links in AdminPanel - > Link Checking
in field Reciprocal Links Checking
check it all to disable.
On should be worked
John Turner is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
no-reciprocal links in admin -- apostrophe problem [UPDATE] Ron Listie Bug Reports 8 01-01-1970 02:06 AM
My links added in admin don`t work. Help me please! paradox Common Questions 1 01-01-1970 12:57 AM
Add in reciprocal after link is added? Michael Tozer Common Questions 2 01-01-1970 12:22 AM
Multi-page Category - Does Admin-added Link show sub-page? Peter Leenders Common Questions 1 01-01-1970 12:22 AM


All times are GMT. The time now is 01:29 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Testimonials | Articles | Support | Documentation | Privacy Policy | License | Affiliates | Contact Us