View Full Version : Suggest a link
Graham
08-15-2006, 06:23 PM
Hi,
Just created an editor and suggested a link
got this error: "Duplicate entry '19' for key 1"
Can anyone help please
PS: I refreshed the page on which the error was showing and it went through and I then got the "Thank you! Your link was submitted for consideration" Message - Odd !!
Sai_dallas
08-15-2006, 06:29 PM
Hi,
I had this issue and Sergey helped me resolve it.
If you look for my posts you can get to the question and the answer for this issue.
.
Graham
08-15-2006, 06:35 PM
Hi again - this is question nite for me as I'm trying to get to grips with the script and get it looking how I want..
On the Home Page there are too many linefeeds/CRs between the category names eg http://www.topgun.org.uk/
Can someone tell me where to edit to get em close together please
Ta!
Graham
Graham
08-15-2006, 06:46 PM
Hi,
I had this issue and Sergey helped me resolve it.
If you look for my posts you can get to the question and the answer for this issue.
.
Found some references to the problem - but couldnt find an answer - how did you fix the issue?
Sergey Ten
08-15-2006, 07:04 PM
Hi,
Just created an editor and suggested a link
got this error: "Duplicate entry '19' for key 1"
Can anyone help please
PS: I refreshed the page on which the error was showing and it went through and I then got the "Thank you! Your link was submitted for consideration" Message - Odd !!
Hello Graham,
Create the php file with such code and execute on your server.
<?php
require_once('includes/config.inc.php');
require_once('classes/DirDb.php');
/** use database class **/
$gDb = new Database();
$gDb->mDbhost = $gDirConfig['dbhost'];
$gDb->mDbname = $gDirConfig['dbname'];
$gDb->mDbuser = $gDirConfig['dbuser'];
$gDb->mDbpwd = $gDirConfig['dbpwd'];
$gDb->connect();
/** get max id for links **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}links`;";
$id_links = $gDb->getOne($sql);
/** get max id for categories **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}categories`;";
$id_categories = $gDb->getOne($sql);
/** get max id for editors **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}editors`;";
$id_editors = $gDb->getOne($sql);
/** get max id for admins **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}admins`;";
$id_admins = $gDb->getOne($sql);
$id_links = (empty($id_links)) ? 0 : $id_links;
$id_categories = (empty($id_categories)) ? 0 : $id_categories;
$id_editors = (empty($id_editors)) ? 0 : $id_editors;
$id_admins = (empty($id_admins)) ? 0 : $id_admins;
/** update information for links **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `links`='{$id_links}';";
$gDb->query($sql);
/** update information for categories **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `categories`='{$id_categories}';";
$gDb->query($sql);
/** update information for editors **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `editors`='{$id_editors}';";
$gDb->query($sql);
/** update information for admins **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `admins`='{$id_admins}';";
$gDb->query($sql);
?>
Graham
08-15-2006, 08:03 PM
Sergey,
Thanks - Ive run the file and added a new link with no errors and no issues - Excellent!!!
Presumably I can now delete the file - might I need it again???
Thanks again for your help!!
Hi again - this is question nite for me as I'm trying to get to grips with the script and get it looking how I want..
On the Home Page there are too many linefeeds/CRs between the category names eg http://www.topgun.org.uk/
Can someone tell me where to edit to get em close together please
Ta!
Graham
Hi Graham
in your css file find:
div.categories div.col
{
float: left;
height: 70px;
text-align: left;
width: 260px;
padding-left: 10px;
padding-top: 5px;
position: relative;
}
div.categories div.last
{
float: left;
height: 70px;
text-align: left;
width: 250px;
padding-left: 10px;
padding-top: 5px;
}
change to:
div.categories div.col
{
float: left;
height: 100%;
text-align: left;
width: 260px;
padding-left: 10px;
padding-top: 5px;
position: relative;
}
div.categories div.last
{
float: left;
height: 100%;
text-align: left;
width: 250px;
padding-left: 10px;
padding-top: 5px;
}
if you have any more questions (unrelated) just start a "new" thread for them.
Thanks :)
Graham
08-15-2006, 08:17 PM
Greg,
Thank you - it's looking better all the time... :D
New thread on the way ;)
Greg,
Thank you - it's looking better all the time... :D
New thread on the way ;)
Looks good. Gosh you have a google PR - 3 already. :)
Graham
08-16-2006, 10:28 AM
Looks good. Gosh you have a google PR - 3 already. :)
Yes - Ive been running the site for a while trying to find the right script - hopefully I have now :good:
vBulletin® v3.7.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.