SMFHacks.com

Modifications/Themes => Modifications Talk => Latest Mods => Topic started by: SMFHacks on July 06, 2006, 08:06:28 am

Title: SMF Links
Post by: SMFHacks on July 06, 2006, 08:06:28 am
SMF Links
 Link to Mod (http://www.smfhacks.com/hacks/SMF-Links.html)
Title: Re: SMF Links
Post by: SMFHacks on July 06, 2006, 06:00:09 pm
Links system now works with SMF 1.0.7 as well enjoy!
Title: Re: SMF Links
Post by: woden on July 07, 2006, 05:36:30 pm
Im happy to see this mod. I can now have my links inside the forum and have one less stand alone program to deal with.

How hard would it be to add a ratings added to the links, so people can rate the link?

Excellent job!
Title: Re: SMF Links
Post by: SMFHacks on July 07, 2006, 06:37:19 pm
Not that hard I have that planned. I included the rating struture in the link table and will have it in the next version. I also have link approval for the next version released.

SMFHacks.com
Title: Re: SMF Links
Post by: SMFHacks on July 08, 2006, 05:39:55 pm
Version 1.1 released.
Added BBC code is allowed for category titles, and description.
Added Top 5 Links Top 5 and Most visited links on main page.
Approval of Links (Permission based)
Link Rating (Permission based)
Links now open in new window.
Title: Re: SMF Links
Post by: penny on July 08, 2006, 06:10:47 pm
Hi  :)

Can i have a screenshot of the links mod how it will look on the forum?

Thanks in advance!

Regards,

Penny

Great site! Will keep an eye here!!  ;) :D
Title: Re: SMF Links
Post by: SMFHacks on July 08, 2006, 06:22:22 pm
I am mostly using test data in these shots.

These are from the main index
(https://www.smfhacks.com/links1.PNG)


(https://www.smfhacks.com/links2.PNG)
Title: Re: SMF Links
Post by: woden on July 08, 2006, 07:42:17 pm
Amazing. This Mod has all the features of a full blown Links program.

Excellent. Im empressed!


Thanks a ton!
Title: Re: SMF Links
Post by: SMFHacks on July 08, 2006, 07:57:21 pm
Thanks, Let me know if you need anything else added.
Title: Re: SMF Links
Post by: ukwalker on July 09, 2006, 11:16:54 am
good mod!!!!
works well....... ^^ :D
Title: Re: SMF Links
Post by: penny on July 09, 2006, 12:06:42 pm
Thanks for the screenshot! Looks good! Will install it tonight!  :D

Great work and thanks!!  :D
Title: Re: SMF Links
Post by: penny on July 09, 2006, 01:25:24 pm
Where can people/members add their link? ??? :D

( I already set the permission ok  ;) :D )
Title: Re: SMF Links
Post by: penny on July 09, 2006, 01:29:56 pm
Never mind  :-[ :-[ :-[ Found it!  ;D
Title: Re: SMF Links
Post by: penny on July 09, 2006, 01:31:21 pm
Hi me again  ;D looool  ;D

Is it also possible to give the option for add link to add their own banner? Would be great!!  :D
Title: Re: SMF Links
Post by: SMFHacks on July 09, 2006, 05:07:31 pm
Hi me again  ;D looool  ;D

Is it also possible to give the option for add link to add their own banner? Would be great!!  :D
Next version I will add that option xD.

SMFHacks.com
Title: Re: SMF Links
Post by: GameSocket on July 09, 2006, 07:14:22 pm
When updateing a new release version. Can you also attach the files that those that already have it installed can download. So that we can know what to overwrite. To your post.
Title: Re: SMF Links
Post by: GameSocket on July 09, 2006, 07:18:04 pm
Or atleast which files do I overwrite with the new version. Only cos I don't know.
Title: Re: SMF Links
Post by: SMFHacks on July 09, 2006, 07:25:20 pm
Just unistall and reinstall the package. It saves all data so you don't have to worry about loosing it.

SMFHacks.com
Title: Re: SMF Links
Post by: GameSocket on July 09, 2006, 07:53:21 pm
umm ok. I'll give it a go.

I like this mod by the way. I dumped my previous html link pages and installed this one thanks.

yep, works for me. That was easy. (https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fgamesocket.geek.nz%2FThemes%2Ftp_Shadowrun11rc2%2Fimages%2Fpost%2Fthumbup.gif&hash=468b52adea8703447a67a354569bc93ba75f181c)
Title: Re: SMF Links
Post by: SMFHacks on July 09, 2006, 08:13:55 pm
Looks great on your site. I like the theme a lot.

SMFHacks.com
Title: Re: SMF Links
Post by: GameSocket on July 09, 2006, 09:29:51 pm
Thanks SMFHack.  Its nice when someone says so...

It all used to be full of more than a couple of menu links.. but new mods like these tidy things up abit and make it very user friendly.

Wanna get it working so the site names highlight or a border of some sort. Or do you think its looks ok?

Actually just a bold bullet point will do me.


Or the  www gif

what would I edit to get that at the site name/link?
Title: Re: SMF Links
Post by: penny on July 10, 2006, 07:54:13 am
Next version I will add that option xD.

SMFHacks.com

Great!!  :D Thanks!
Title: Re: SMF Links
Post by: Pat on July 11, 2006, 05:13:12 pm
How do you add links?
Title: Re: SMF Links
Post by: SMFHacks on July 11, 2006, 05:28:37 pm
To add links first create a category. Then go under the category and click the add links link.

SMFHacks.com
Title: Re: SMF Links
Post by: RedHed on July 11, 2006, 05:38:21 pm
There is no option for that..
Title: Re: SMF Links
Post by: Pat on July 11, 2006, 05:40:42 pm
When I add a category I don't have an option to add a link.

test - Total Links: 0
test
[Up] [Down] [Edit] [Delete]

Nevermind. I had to click the actual category.
Title: Re: SMF Links
Post by: SMFHacks on July 11, 2006, 05:42:43 pm
You have to click the title of the category that takes you to the category page in which you can add links to it.

SMFHacks.com
Title: Re: SMF Links
Post by: Elen on July 12, 2006, 09:01:44 am
I've just installed this and, as far as I can tell, it's added no funcionality at all  ???  I have scoured the admin section and I have nowhere to add categories, links or set permissions regarding links.  The only mention of Categories is to do with TinyPortal and articles.
Title: Re: SMF Links
Post by: SMFHacks on July 12, 2006, 11:36:19 am
Then the mod isn't installed.
Links are not handled in the admin panel. You need to go to the links page http://yoursite.com/index.php?act=links  from there you can add categories and manage links.
Only thing in the admin panel you will find is permissions under the permissions page.

SMFHacks.com
Title: Re: SMF Links
Post by: Elen on July 12, 2006, 12:15:18 pm
Ah - now I have it :)  Did I miss something in the readme?
Title: Re: SMF Links
Post by: Elen on July 12, 2006, 02:21:47 pm
The only problem I still have with it is when I go to set permissions there is no text against the tick boxes.  I had a look at the source code so figured out which tick box was for what but life would be a lot simpler if there was some text there.  At forst I wondered if it was something to do with the theme I'm using, that maybe the text was there but not visible but looking at the source code, it's definitely not there at all.
Title: Re: SMF Links
Post by: SMFHacks on July 12, 2006, 02:35:27 pm
You don't have something like this?

(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fsmfhacks.com%2Fmodperm.PNG&hash=361b08f5f8fe3ec80d44ef9feecf40985e24fae2)

Are you using another language other than english for your forum?
Title: Re: SMF Links
Post by: Elen on July 12, 2006, 03:15:21 pm
The only language I have on the Forum is English.  This is what my Permissions screen looks like.
(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Felders.me.uk%2Flinks_screenie.jpg&hash=eb51febce6e5b856f9df8f1ec35f4de99b311c7b)

As you can see, the check boxes are there but the text labels next to them are not.  Apart from that it all works really well - the mod is just what I was looking for :)
Title: Re: SMF Links
Post by: SMFHacks on July 12, 2006, 03:29:17 pm
Open up Modifications.english.php

Add these before ?>

Code: [Select]
//Begin SMF Links Text Strings
$txt['smflinks_menu'] = 'Links';
$txt['permissiongroup_smflinks'] = 'SMF Links';
$txt['permissionname_view_smflinks'] = 'View Links Page';
$txt['permissionhelp_view_smflinks'] = 'Sets if the user can view the links page.';
$txt['cannot_view_smflinks'] = 'You can not view the links page.';
$txt['permissionname_add_links'] = 'Add Links';
$txt['permissionhelp_add_links'] = 'If the user is allowed to submit links';
$txt['cannot_add_links'] = 'You can not add links.';
$txt['permissionname_edit_links'] = 'Edit Links';
$txt['permissionhelp_edit_links'] = 'If the user is allowed to edit links';
$txt['cannot_edit_links'] = 'You can not edit links.';
$txt['permissionname_delete_links'] = 'Delete Links';
$txt['permissionhelp_delete_links'] = 'If the user is allowed to delete links';
$txt['cannot_delete_links'] = 'You can not delete links.';
$txt['permissionname_approve_links'] = 'Approve Links';
$txt['permissionhelp_approve_links'] = 'If the user is allowed to approve links';
$txt['cannot_approve_links'] = 'You can not approve links.';
$txt['permissionname_links_auto_approve'] = 'Links Auto Approved';
$txt['permissionhelp_links_auto_approve'] = 'If the users links are auto approved when submitted.';
$txt['permissionname_rate_links'] = 'Rate Links';
$txt['permissionhelp_rate_links'] = 'If the user is allowed to rate links';
$txt['cannot_rate_links'] = 'You are not allowed to rate links.';
$txt['permissionname_links_manage_cat'] = 'Manage Categories';
$txt['permissionhelp_links_manage_cat'] = 'User can add/remove/edit/reorder categories';
$txt['cannot_links_manage_cat'] = 'You are not allowed to manage categories.';
//END SMF Links Strings
Title: Re: SMF Links
Post by: Elen on July 13, 2006, 12:22:59 am
Thanks for the code - that fixed it :)  I had 2 Modifications.english.php files - one in the default theme which did have that code and one in the theme I'm using, which didn't - now I've added it, the text shows up.

Thanks you again for your help - it's a great Mod :D
Title: Re: SMF Links
Post by: penny on July 13, 2006, 02:33:02 pm
I added the option that people can add their own banner!

In each table "top 5 rated, top 5 visited, category" in links.template.php i added the banner option:

Here an example of a table, because i don't know how to show it otherwise  ;)

Code: [Select]
echo '<table border="0" cellpadding="0" cellspacing="0" width="50%">
  <tr>
    <td width="100%">';

//Show Top 5 rated
echo '<div class="tborder" style="margin: 2%;"><div class="catbg2" align="center">Top Five Rated Links</div>';
$dbresult = db_query("SELECT l.ID_LINK, l.rating, l.title,l.date, m.memberName, l.ID_MEMBER,banner,l.description,l.hits FROM {$db_prefix}links AS l, {$db_prefix}members AS m WHERE  l.ID_MEMBER = m.ID_MEMBER AND l.approved = 1 ORDER BY l.rating DESC LIMIT 5", __FILE__, __LINE__);
while($row = mysql_fetch_assoc($dbresult))
{
echo '<div class="tborder" style="margin: 2%;"><div><a href="' . $scripturl . '?action=links;sa=visit;id=' . $row['ID_LINK'] . '" target="blank">' . $row['title'] . '</a></div>';
echo '<div class="banner" style="margin: 2%;"><a href="' . $scripturl . '?action=links;sa=visit;id=' . $row['ID_LINK'] . '" target="blank"><img src=" ' . $row['banner'] . '" maxwidth="468" maxheight="60"></a></div>';
echo '<div class="banner">' . nl2br($row['description']) . '<br /><br />';
echo 'Hits: ' . $row['hits'] . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rating: ' . $row['rating'];
if($ratelink)
echo '&nbsp;<a href="' . $scripturl . '?action=links;sa=rate;value=1;id=' . $row['ID_LINK'] . '"><img src="', $settings['images_url'], '/post/good.gif" alt="Good Link" border="0" /></a>&nbsp;&nbsp;<a href="' . $scripturl . '?action=links;sa=rate;value=0;id=' . $row['ID_LINK'] . '"><img src="', $settings['images_url'], '/post/bad.gif" alt="Bad Link" border="0" /></a>' .'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Comments:' .'&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://pinklady.ath.cx/MPCS/comment.php?pageid=1" target="_blank">Comments</a><br>';
echo '<br /></div>';
if($editlink)
echo '<a href="' . $scripturl . '?action=links;sa=editlink;id=' . $row['ID_LINK'] . '">[Edit]</a>&nbsp;';
if($deletelink)
echo '<a href="' . $scripturl . '?action=links;sa=deletelink;id=' . $row['ID_LINK'] . '">[Delete]</a>
<br />';
echo ' Submitted by:<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '">'  . $row['memberName'] . '</a>&nbsp;<font class="smalltext">Added on ' . timeformat($row['date']) . '</font><br>';
echo '</div></div><br />';
}
echo '</div>';

echo '</td>';


echo '</tr>
</table>';

Also add in links.template.php:


After code:
Code: [Select]
<tr>
    <td width="28%" height="22" class="windowbg2"><span class="gen"><b>Url</b></span></td>
    <td width="72%" height="22" class="windowbg2"><input type="text" name="url" size="64" maxlength="250" value="http://" /></td>
  </tr>

Insert this code after above code!
Code: [Select]
<tr>
    <td width="28%" height="22" class="windowbg2"><span class="gen"><b>Banner(maxwidth 468px and maxheight 60px)</b></span></td>
   <td width="72%" height="22" class="windowbg2"><input type="text" name="banner" size="64" maxlength="250" value="http://" /></td>
  </tr>

The links.php: ( search for all the "banner" words and add those lines/words in your links.php )

Code: [Select]
<?php
/*
SMF Links
Version 1.1
by:vbgamer45
http://www.smfhacks.com
*/

if (!defined('SMF'))
die('Hacking attempt...');

function 
LinksMain()
{

//Load the main links template
loadtemplate('Links');

//Link actions
$subActions = array(

'addlink' => 'AddLink',
'addlink2' => 'AddLink2',
'editlink' => 'EditLink',
'editlink2' => 'EditLink2',
'visit' => 'VisitLink',
'deletelink' => 'DeleteLink',
'deletelink2' => 'DeleteLink2',
'catup' => 'CatUp',
'catdown' => 'CatDown',
'addcat' => 'AddCat',
'addcat2' => 'AddCat2',
'editcat' => 'EditCat',
'editcat2' => 'EditCat2',
'deletecat' => 'DeleteCat',
'deletecat2' => 'DeleteCat2',
'rate' => 'RateLink',
'approve' => 'Approve',
'noapprove' => 'NoApprove',
'alist' => 'ApproveList'
);


// Follow the sa or just go to main links index.
if (!empty($subActions[@$_GET['sa']]))
$subActions[$_GET['sa']]();
else
view();

}
function 
view()
{
global $context$mbname;

//Check if the current user can view the links list
isAllowedTo('view_smflinks');

//Load the main index links template
$context['sub_template']  = 'main';

//Set the page title
$context['page_title'] = $mbname ' - Links';
}
function 
AddCat()
{
global $context$mbname;
isAllowedTo('links_manage_cat');

$context['sub_template']  = 'addcat';

//Set the page title
$context['page_title'] = $mbname ' - Links - Add Category';

}
function 
AddCat2()
{
global $db_prefix;
isAllowedTo('links_manage_cat');

//Clean the input
$title htmlentities($_POST['title'], ENT_QUOTES);
$description htmlentities($_POST['description'], ENT_QUOTES);

if($title == '')
fatal_error('You need to enter a category title');

//Do the order
$dbresult db_query("SELECT roworder FROM {$db_prefix}links_cat ORDER BY roworder DESC"__FILE____LINE__);
$row mysql_fetch_assoc($dbresult);

$order $row['roworder'];
$order++;

//Insert the category
$request = db_query("INSERT INTO {$db_prefix}links_cat
(title, description,roworder)
VALUES ('
$title', '$description',$order)"__FILE____LINE__);
mysql_free_result($dbresult);

$_POST '';

redirectexit('action=links');


}
function 
EditCat()
{
global $context$mbname;
isAllowedTo('links_manage_cat');

$context['sub_template']  = 'editcat';

//Set the page title
$context['page_title'] = $mbname ' - Links - Edit Category';

}
function 
EditCat2()
{
global $db_prefix;
isAllowedTo('links_manage_cat');

//Clean the input
$title htmlentities($_POST['title'], ENT_QUOTES);
$description htmlentities($_POST['description'], ENT_QUOTES);
$catid htmlentities($_POST['catid'], ENT_QUOTES);

if($title == '')
fatal_error('You need to enter a category title');

//Update the category
$request = db_query("UPDATE {$db_prefix}links_cat
SET title = '
$title', description = '$description' WHERE ID_CAT = $catid"__FILE____LINE__);


$_POST '';

redirectexit('action=links');

}
function 
DeleteCat()
{
global $context$mbname;
isAllowedTo('links_manage_cat');

$context['sub_template']  = 'deletecat';

//Set the page title
$context['page_title'] = $mbname ' - Links - Delete Category';

}
function 
DeleteCat2()
{
global $db_prefix;
isAllowedTo('links_manage_cat');
$catid htmlentities($_POST['catid'], ENT_QUOTES);

//Delete All links
db_query("DELETE FROM {$db_prefix}links WHERE ID_CAT = $catid"__FILE____LINE__);
//Finally delete the category
db_query("DELETE FROM {$db_prefix}links_cat WHERE ID_CAT = $catid"__FILE____LINE__);

$_POST '';

redirectexit('action=links');
}



function 
AddLink()
{
global $context$mbname;
isAllowedTo('add_links');

$context['sub_template']  = 'addlink';

//Set the page title
$context['page_title'] = $mbname ' - Links - Add Link';

}
function 
AddLink2()
{
global $ID_MEMBER,$db_prefix;

isAllowedTo('add_links');

//Clean the input
$title htmlentities($_POST['title'], ENT_QUOTES);
$banner htmlentities($_POST['banner'], ENT_QUOTES);
$description htmlentities($_POST['description'], ENT_QUOTES);
$url htmlentities($_POST['url'], ENT_QUOTES);
$catid htmlentities($_POST['catid'], ENT_QUOTES);

if($title == '')
fatal_error('You need to enter a link title');

if($url == '')
fatal_error('You need to enter a link url');

//Check if the url already exists?
$dbresult db_query("SELECT l.url,l.ID_CAT, l.title linkname, c.title cname FROM {$db_prefix}links AS l, {$db_prefix}links_cat AS c WHERE l.url = '$url' AND l.ID_CAT = c.ID_CAT"__FILE____LINE__);
$row mysql_fetch_assoc($dbresult);
//The link already exists
if(db_affected_rows() != 0)
fatal_error('The link already exists in category ' $row['cname'] . ' with link title of ' $row['linkname']);


//Insert the links
$t time();
if(allowedTo('links_auto_approve'))
{
$request = db_query("INSERT INTO {$db_prefix}links
(ID_CAT, url, title, banner, description,ID_MEMBER,date,approved)
VALUES (
$catid,'$url','$title', '$banner', '$description',$ID_MEMBER,$t,1)"__FILE____LINE__);
}
else
{
$request = db_query("INSERT INTO {$db_prefix}links
(ID_CAT, url, title, banner, description,ID_MEMBER,date,approved)
VALUES (
$catid,'$url','$title','$banner','$description',$ID_MEMBER,$t,0)"__FILE____LINE__);

fatal_error('Note: Your link needs to be approved before it is visible.');
}
//Redirect back to category
redirectexit('action=links;cat=' $catid);


}
function 
EditLink()
{
global $context$mbname;
isAllowedTo('edit_links');

$context['sub_template']  = 'editlink';

//Set the page title
$context['page_title'] = $mbname ' - Links - Edit Link';

}
function 
EditLink2()
{
global $db_prefix;
isAllowedTo('edit_links');

//Clean the input
$title htmlentities($_POST['title'], ENT_QUOTES);
$banner htmlentities($_POST['banner'], ENT_QUOTES);
$description htmlentities($_POST['description'], ENT_QUOTES);
$url htmlentities($_POST['url'], ENT_QUOTES);
$id htmlentities($_POST['id'], ENT_QUOTES);

if($title == '')
fatal_error('You need to enter a link title');

if($url == '')
fatal_error('You need to enter a link url');

//Update the category
$request = db_query("UPDATE {$db_prefix}links
SET title = '
$title',url= '$url', description = '$description' WHERE ID_LINK = $id"__FILE____LINE__);


//Redirect back to category
redirectexit('action=links;cat=' $catid);

}
function 
DeleteLink()
{
global $context$mbname;
isAllowedTo('delete_links');

$context['sub_template']  = 'deletelink';

//Set the page title
$context['page_title'] = $mbname ' - Links - Delete Link';

}
function 
DeleteLink2()
{
global $db_prefix;

isAllowedTo('delete_links');

$id = @$_REQUEST['id'];

if($id == '')
fatal_error('No link selected');

db_query("DELETE FROM {$db_prefix}links WHERE ID_LINK = $id"__FILE____LINE__);

}
function 
VisitLink()
{
global $db_prefix;
//Check if the current user can view the links list
isAllowedTo('view_smflinks');

$id = @$_REQUEST['id'];

if($id == '')
fatal_error('No link selected');

//Update site lists
$request = db_query("UPDATE {$db_prefix}links
SET hits = hits + 1 WHERE ID_LINK = 
$id"__FILE____LINE__);

//Redirect to the site
$dbresult db_query("SELECT url FROM {$db_prefix}links WHERE ID_LINK = $id"__FILE____LINE__);
$row mysql_fetch_assoc($dbresult);
mysql_free_result($dbresult);
header("Location: " $row['url']);
}
function 
CatUp()
{
global $db_prefix;
//Check if they are allowed to manage cats
isAllowedTo('links_manage_cat');

//Get the cat id
$cat = @$_REQUEST['cat'];
//Check if there is a category above it
//First get our row order
$dbresult1 db_query("SELECT roworder FROM {$db_prefix}links_cat WHERE ID_CAT = $cat"__FILE____LINE__);
$row mysql_fetch_assoc($dbresult1);
$oldrow $row['roworder'];
$o $row['roworder'];
$o--;

mysql_free_result($dbresult1);
$dbresult db_query("SELECT ID_CAT, roworder FROM {$db_prefix}links_cat WHERE roworder = $o"__FILE____LINE__);
if(db_affected_rows()== 0)
fatal_error('There is no category above the current one.');
$row2 mysql_fetch_assoc($dbresult);


//Swap the order Id's
$request = db_query("UPDATE {$db_prefix}links_cat
SET roworder = 
$oldrow WHERE ID_CAT = " .$row2['ID_CAT'], __FILE____LINE__);

$request = db_query("UPDATE {$db_prefix}links_cat
SET roworder = 
$o WHERE ID_CAT = $cat"__FILE____LINE__);


mysql_free_result($dbresult);

//Redirect to index to view cats
redirectexit('action=links');
}
function 
CatDown()
{
global $db_prefix;

//Check if they are allowed to manage cats
isAllowedTo('links_manage_cat');

//Get the cat id
$cat = @$_REQUEST['cat'];
//Check if there is a category below it
//First get our row order
$dbresult1 db_query("SELECT roworder FROM {$db_prefix}links_cat WHERE ID_CAT = $cat"__FILE____LINE__);
$row mysql_fetch_assoc($dbresult1);
$oldrow $row['roworder'];
$o $row['roworder'];
$o++;

mysql_free_result($dbresult1);
$dbresult db_query("SELECT ID_CAT, roworder FROM {$db_prefix}links_cat WHERE roworder = $o"__FILE____LINE__);
if(db_affected_rows()== 0)
fatal_error('There is no category above the current one.');
$row2 mysql_fetch_assoc($dbresult);


//Swap the order Id's
$request = db_query("UPDATE {$db_prefix}links_cat
SET roworder = 
$oldrow WHERE ID_CAT = " .$row2['ID_CAT'], __FILE____LINE__);

$request = db_query("UPDATE {$db_prefix}links_cat
SET roworder = 
$o WHERE ID_CAT = $cat"__FILE____LINE__);


mysql_free_result($dbresult);


//Redirect to index to view cats
redirectexit('action=links');
}
function 
ApproveList()
{
global $context$mbname;
isAllowedTo('approve_links');

$context['sub_template']  = 'approvelinks';

//Set the page title
$context['page_title'] = $mbname ' - Links - Approve Links';
}
function 
Approve()
{
global $db_prefix;

isAllowedTo('approve_links');
//Get link id
@$id $_REQUEST['id'];

$request = db_query("UPDATE {$db_prefix}links
SET approved = 1 WHERE ID_LINK = 
$id LIMIT 1"__FILE____LINE__);


redirectexit('action=links;sa=alist');
}
function 
NoApprove()
{
global $db_prefix;

isAllowedTo('approve_links');
//Get link id
@$id $_REQUEST['id'];

$request = db_query("UPDATE {$db_prefix}links
SET approved = 0 WHERE ID_LINK = 
$id LIMIT 1"__FILE____LINE__);


redirectexit('action=links');
}
function 
RateLink()
{
global $db_prefix$ID_MEMBER;

isAllowedTo('rate_links');

//Get the link ID
@$id $_REQUEST['id'];

if($id == '')
fatal_error('Invalid Link ID');

//See if the user already rated the link.
$dbresult db_query("SELECT ID_LINK, ID_MEMBER FROM {$db_prefix}links_rating WHERE ID_MEMBER = $ID_MEMBER AND ID_LINK = $id"__FILE____LINE__);
if(db_affected_rows()!= 0)
fatal_error('You already rated this link');


//Get the value of rating
@$value $_REQUEST['value'];


//Check value
if($value ==0)
{
//Lower Ranking

//Insert rating
$request = db_query("INSERT INTO {$db_prefix}links_rating
(ID_LINK, ID_MEMBER,value)
VALUES (
$id$ID_MEMBER,0)"__FILE____LINE__);

//Update main link rating
$dbresult db_query("UPDATE {$db_prefix}links
SET rating = rating - 1 WHERE ID_LINK = 
$id LIMIT 1"__FILE____LINE__);

}
else
{
//Higher Ranking
//Insert rating
$request = db_query("INSERT INTO {$db_prefix}links_rating
(ID_LINK, ID_MEMBER,value)
VALUES (
$id$ID_MEMBER,1)"__FILE____LINE__);

//Update main link rating
$dbresult db_query("UPDATE {$db_prefix}links
SET rating = rating + 1 WHERE ID_LINK = 
$id LIMIT 1"__FILE____LINE__);
}


redirectexit('action=links');
}
?>

In style.css add: ( this will give a maximum height and width to banners that members can add! You can change this if you want :) )

Code: [Select]
.banner
{
width: 468px;
height: 60px;
overflow: hidden;
padding: 3px;
}

Hope you guys can understand this :D Otherwise contact me and i will help you  :D ( hope i didn't forget code  ;D otherwise contact me if it doesn't work :D )

Regards,

Penny :)



Title: Re: SMF Links
Post by: penny on July 13, 2006, 02:42:42 pm
I have also a question. Is it possible to have comments for each link?
That everyone can give a comment about the link?

I installed MPCS http://tpvgames.co.uk/web/mpcs/ (http://tpvgames.co.uk/web/mpcs/) which looks great for comments but how can i add this seperatly for each link?

Hope someone can help me!  :)
Title: Re: SMF Links
Post by: SMFHacks on July 14, 2006, 09:16:53 am
Not yet I might add comments/reviews in next version. Trying to see the scope of this links project heh.

SMFHacks.com
Title: Re: SMF Links
Post by: Jump1979man on July 14, 2006, 06:56:08 pm
I keep getting this error when trying to install...

An Error Has Occurred!
You cannot download or install new packages because the Packages directory or one of the files in it are not writable! 


I have my permissions set to 777 for the packages directory but it still will not work.  First time this has happened on over 15 mods done to my site.  Any help?
Title: Re: SMF Links
Post by: SMFHacks on July 14, 2006, 09:23:13 pm
Not sure where you download it from?
Title: Re: SMF Links
Post by: Jump1979man on July 14, 2006, 09:47:14 pm
Not sure where you download it from?


here, smf site, and fromt he news center on my smf site.
Title: Re: SMF Links
Post by: Jump1979man on July 15, 2006, 11:32:32 pm
anyone else help with this?  I would really like to add it to my site..
Title: Re: SMF Links
Post by: ~!~ on July 16, 2006, 12:49:48 am
Hi
This mods is wonderful. ;D It is just fit my idea of a common favourite menu for all members. They could add the links and the admin/moderators would decide whether to allow.

I added the mods to Amber theme myself, so if anyone need the instructions to add it to Amber theme, I would be glad to help.

But there is still a problem. I could not post Unicode character. As my forum is for Vietnamese, this is very important.
You can see at : http://www.itbk.org/forum/index.php?action=links;cat=2

Would you please fix it in the next version so that it could display Unicode?  :)
Thank you,
Title: Re: SMF Links
Post by: ~!~ on July 18, 2006, 11:36:36 am
Strange! how quiet it is  ;)
Title: Re: SMF Links
Post by: SMFHacks on July 18, 2006, 01:25:29 pm
I don't know what to do for this. I have no experience using unicode.
Title: Re: SMF Links
Post by: Jump1979man on July 18, 2006, 07:50:31 pm
I get this error when installing.....


Fatal error: packageinstall(): Failed opening required '/home/jason79/www/smf/Packages/temp/./linksql.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jason79/public_html/smf/Sources/Packages.php on line 534
Title: Re: SMF Links
Post by: ~!~ on July 19, 2006, 05:50:56 am
Strange! how quiet it is  ;)

Thanks for replying.
Hope I will find the solution and share it here later :)
Title: Re: SMF Links
Post by: ~!~ on July 19, 2006, 11:22:20 am
Could you please tell me where is the code to display these links and descriptions text?
Title: Re: SMF Links
Post by: SMFHacks on July 19, 2006, 01:06:24 pm
All the display parts are in links.template.php in your default theme folder. You would need to look into the main function which displays both the categories and links.

SMFHacks.com
Title: Re: SMF Links
Post by: Jump1979man on July 20, 2006, 08:06:02 pm
too bad no one can help me.....seemed like a decent mod... :'(
Title: Re: SMF Links
Post by: SMFHacks on July 21, 2006, 08:01:26 am
too bad no one can help me.....seemed like a decent mod... :'(
Not much I can do for that. You can try installing it again or manualy install it.
Title: Re: SMF Links
Post by: Jump1979man on July 21, 2006, 01:49:14 pm
too bad no one can help me.....seemed like a decent mod... :'(
Not much I can do for that. You can try installing it again or manualy install it.


Why would it be that this particular mod would be the only one giving me problems on install? 

I have 12-15 other mods installed with no problems whatsoever.
Title: Re: SMF Links
Post by: gamesmad on July 21, 2006, 03:02:03 pm
Im not sure, I have had that same error on a mod that I made, and I just dont know what is wrong with it...

Will
Title: Re: SMF Links
Post by: GameSocket on July 21, 2006, 11:24:28 pm
may have something to do with 
Quote
12-15 other mods
Title: Re: SMF Links
Post by: Jump1979man on July 22, 2006, 09:54:52 am
may have something to do with 
Quote
12-15 other mods


doubt it.....
Title: Re: SMF Links
Post by: GameSocket on July 22, 2006, 11:24:58 pm
ok
Title: Re: SMF Links
Post by: ~!~ on July 24, 2006, 11:12:11 am
I found the problem.

It was because when SMF Links save the text into database; the & character becomes "&amp;" and when SMF Links display the text, "&amp;" becomes &.

But the problem is : in ISO and UTF-8 charsets, & is used to specify special characters; for example
"ấ" stands for "ấ".
If & becomes "&amp;" then "ấ" becomes "&amp;#7845;" and when SMF links display it back; it would be "ấ" not "ấ" (if you delete the "amp;" it would becomes "ấ")

So could you fix it to not add "amp;" automatically after the & character? Or at least tell me how to fix it.

Thnks
Title: Re: SMF Links
Post by: ~!~ on July 24, 2006, 11:42:55 am
I fixed it by changing the following codes in Links.php :
Code: [Select]
function AddLink2()
{
global $ID_MEMBER,$db_prefix;

isAllowedTo('add_links');

//Clean the input
$title = htmlentities($_POST['title'], ENT_QUOTES);
$description = htmlentities($_POST['description'], ENT_QUOTES);
$url = htmlentities($_POST['url'], ENT_QUOTES);
$catid = htmlentities($_POST['catid'], ENT_QUOTES);

into

Code: [Select]
function AddLink2()
{
global $ID_MEMBER,$db_prefix;

isAllowedTo('add_links');

//Clean the input
$title = $_POST['title'];
$description = $_POST['description'];
$url = $_POST['url'];
$catid = $_POST['catid'];
Title: Re: SMF Links
Post by: SMFHacks on July 24, 2006, 01:57:28 pm
I was going to say to do that.  ;D Only reason why I use my way is to filter out html code, and other possibel scripts that could be run.
Title: Re: SMF Links
Post by: hypnotic on July 28, 2006, 06:40:20 pm
hi!, i have a problem.

accidentaly, i enabled the links manager, but now, i can't disable it.

if you can help me, tel me too, how can i disable the ARCADE button, because it dont work,

i'll wait for your post's,

tnx!
Title: Re: SMF Links
Post by: hypnotic on July 28, 2006, 06:41:46 pm
and my version of smf, is the 1.0.7

tnx!
Title: Re: SMF Links
Post by: SMFHacks on July 28, 2006, 08:30:10 pm
You can just unistall the linsk mod.
The arcade you can unistall as well from the package manager.
Title: Re: SMF Links
Post by: hypnotic on July 30, 2006, 02:05:33 am
You can just unistall the linsk mod.
The arcade you can unistall as well from the package manager.

tnx, now the question is:

how can i uninstall it???

Title: Re: SMF Links
Post by: GameSocket on July 30, 2006, 02:55:48 am
Admin>>>Packages>>>Installed packages>>>  SMF Links 1.1 [ Uninstall ]
Title: Re: SMF Links
Post by: Phoenxx on July 31, 2006, 04:19:57 pm
No one can see the links on our forum at all. Only the admin can see the link button. I do have Ad Managment version 1.0.2b installed.
Title: Re: SMF Links
Post by: GameSocket on July 31, 2006, 04:48:30 pm
Links>>>( scroll right down)>>Links Directory Panel>> Permissions>> regular members>>modify>> and somewhere in there you will have SMF Links

Choose what you want them to be able to do and scroll down >>save changes<<

Same thing for guests..moderators.........blah blah
Title: Re: SMF Links
Post by: Phoenxx on July 31, 2006, 05:34:56 pm
OK I have it ... thanks
Title: Re: SMF Links
Post by: MiNiBuDa on July 31, 2006, 10:03:35 pm
Hi !

I've installed this mod, but I want change some colours.

Example:
(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fimg216.imageshack.us%2Fimg216%2F7071%2Fenlacesoj0.jpg&hash=f8adbb77150f792cf4124bc8e192ee8f5ff58a55)

I want change background colour in the links mod. I see than this colour is of .tborder in my style.css.

How I change the colour, but no modificate these propierty of style.css???

Sorry for my bad english.

Thanks.
Title: Re: SMF Links
Post by: woden on August 02, 2006, 05:13:18 pm
MiNiBuDa just edit links.template.php

I want to allow parsing of bbc code in the descriptions, I know you only have to say "parse_bbc" but Im not sure where to add that.
Title: Re: SMF Links
Post by: SMFHacks on August 02, 2006, 05:24:06 pm
In the descriptions of links?
Title: Re: SMF Links
Post by: woden on August 02, 2006, 11:22:54 pm
Thanks, that worked great. This is a very versatile and useful mod ;D
Title: Re: SMF Links
Post by: Jump1979man on August 03, 2006, 12:32:39 pm
I finally got the mod to work.....a permission in the .ini file wasnt set right for this particular mod.....


any chance on integrating the user's idea which allowed banners to be added?  I dont want to manually change anything due to worry of screwing up.  Thanks.
Title: Re: SMF Links
Post by: SMFHacks on August 03, 2006, 01:32:42 pm
Yeah in the next version I will have banner images for links.
Title: Re: SMF Links
Post by: Jump1979man on August 03, 2006, 01:34:37 pm
Yeah in the next version I will have banner images for links.

Got a time frame for this next version coming out?

not trying to pry just kinda wondering.....Nice mod.  Thanks!
Title: Re: SMF Links
Post by: MiNiBuDa on August 03, 2006, 08:46:05 pm
I can't insert images into description of links.
Title: Re: SMF Links
Post by: GameSocket on August 03, 2006, 08:55:43 pm
Yeah in the next version I will have banner images for links.

Thats why
Title: Re: SMF Links
Post by: theunder-ground on August 06, 2006, 06:11:19 pm
This mod is perfect, but I would like to make some suggestions for this mod. 

Having Sub catagories.  We have a set of links in a post for forums, but those are broken down into subcatagories.  We have other lists like this that we would want to put into this mod.

So it would look like this

Forums(shown on the main index of the links page)
> Dolling and Graphics
>>Links to forums
> Roleplaying
>>Links to forums
> Anime
>>Links to forums

Tutorials(shown on the main index of the links page)
> Clothes - Female
>>Links to sites
> CG's
>>Links to sites
> Other
>>Links to sites

and so on...

Also, being able to sort them by different things(Alphabetical, rating, hits, ect...)
Title: Re: SMF Links
Post by: spree on August 09, 2006, 06:36:09 am
Hi guys

My 1st post  ;D

When I try to install SMF Links

I get this error:

Execute Modification - /Themes/default/index.template.php - Test failed

I am running SMF 1.1 RC2 with TinyPortal v0.8.6 and using the Amber TP template.

Anyone come across this before?

I have Chmodded the file to 777 but still get the same error.

Thanks
Title: Re: SMF Links
Post by: SMFHacks on August 09, 2006, 07:58:09 am
That's since you are not using the default theme and it attempts to edit the index.template.php to add a link. You can install it manually or remove the editing of index.template.php from the install.
Title: Re: SMF Links
Post by: hbixler03 on August 09, 2006, 04:03:29 pm
How come this link mod will only work in the default theme?  Do I need to add some code to my new theme in order to make it work?

Thanks
Heather :)
Title: Re: SMF Links
Post by: SMFHacks on August 09, 2006, 04:06:07 pm
It could work easly on any theme just really need to add a button or link to the links section from the main index.
Title: Re: SMF Links
Post by: SMFHacks on August 09, 2006, 04:08:44 pm
Uploaded a new package that doesn't make the index edit required.
Title: Re: SMF Links
Post by: christerry on August 31, 2006, 10:06:37 am
Alrighty...I read through this thread and I think I am still missing a piece or two to make this work.

1. I can access the links page by tacking "?action=links" at the end of my URL, but I can't see the links page in any other way or link to it on my main forum.

2. I don't have anything related to links in my Admin Center...should I?

3. On my main index, should I have a "links" button on top or something?

I am just confused as to how to connect it all.

Title: Re: SMF Links
Post by: SMFHacks on August 31, 2006, 03:14:06 pm
1. Depends if you are using a custom theme you will need to add a link or button.

2. Nothing is in the admin panel you manage all links from the links page.

3. Same as #1
Title: Cant add another link after first created - error below
Post by: alecoddlyiv on September 02, 2006, 06:27:25 am
An Error Has Occurred!
The link already exists in category XXXX with link title of Test XXXX for sale

I have tried adding another catagory which works but keep getting this error.

I am using SMF 1.1 RC2 and tiny portal 0.85 on firefox

Thanks
Title: Re: SMF Links
Post by: SMFHacks on September 02, 2006, 09:12:48 am
It checks if you put the extact same link url in the same category and won't let you do it.

SMFHacks.com
Title: Re: SMF Links
Post by: benny on September 03, 2006, 07:59:33 am
I have just added this mod to my site and I am very gratefull for it.
Thanks you very much for making it.

Would it be possible to make it handle HTML or at very least a picture with a hyper link on it.

I want to convert this http://www.machsupport.com/artsoft/links/links.htm to my forum http://machsupport.com/forum/index.php

Thanks again for your help.

I will make sure I let other SMF users know about this place.

Benny

EDIT: It would be good if the user could upload the picture at the same time as submitting the link. Just the same way as in a post.
Title: Re: SMF Links
Post by: christerry on September 04, 2006, 10:44:38 pm
1. Depends if you are using a custom theme you will need to add a link or button.

2. Nothing is in the admin panel you manage all links from the links page.

3. Same as #1

Ah..ok. I do need a button. Thanks!
Title: Re: SMF Links
Post by: christerry on September 12, 2006, 10:19:28 am
Ok, I got a button, and it works awesome!

I opened my Links page to guests, so:

www.importcartalk.com

Check it out!
Title: Re: SMF Links HELP
Post by: BJ05 on September 20, 2006, 10:07:36 pm
Installed SMF Links through package manager and everything works except when I go to set the permissions and I get this error

Quote
Parse error: parse error, unexpected ',', expecting ')' in /home/fronter/public_html/lg/Sources/ManagePermissions.php on line 1357

Not only does it efffect the links mod, but the entire site! Changing back to the .bak file of managepermissions.php gives me the same error!

Any solutions and quick? I do not know how this is effecting the forum in general.

http://www.ladiesofnuevolaredo.com
Title: Re: SMF Links
Post by: SMFHacks on September 20, 2006, 10:35:28 pm
Can you post the code around that line 1357 in /ManagePermissions.php

Posted a new version of SMFLinks.
Title: Re: SMF Links
Post by: BJ05 on September 21, 2006, 02:09:17 am
Quote
'tinyportal_team' => array(
            'tp_teampage' => false,
         ),
LINE 1356         // Tinyportal end
LINE 1357------------------->,
      ),
      'board' => array(
         'general_board' => array(
            'moderate_board' => false,
         ),
         'topic' => array(
            'post_new' => false,


Found and fixed the problem. Tiny portal was called twice. Removed the second call (redundant) and the problem fixed itself.

There is one other small problem which I can fix if I know where to look. There is one instane of SMF Hacks instralled on the site but there are two link buttons in the menu bar. Where or how do I remove the second one. My mind is blank tonight for some reason.

Thanks for the help
Title: Re: SMF Links
Post by: SMFHacks on September 21, 2006, 08:46:39 am
Menu links would be located in index.template.php of the theme you are using in the menu function.
Title: Re: SMF Links
Post by: denaon on October 02, 2006, 05:00:55 pm
Hi!!! ;D
I'm so happy with this mod!!! It's great!!!
But now, I need some help.... :-[
I'm not an experienced user of SMF (though I manage myself)....I need to have this mod in the Spanish template....in the default theme and in another one (Neptune) too  :D
I know I might be asking too much, but is there a way to do that??

Thanks in advance!!!  ;D
Title: Re: SMF Links
Post by: SMFHacks on October 02, 2006, 05:11:57 pm
I plan on updating the mod after I finish the gallery system. I will make it multipe languages for the link system.
Title: Re: SMF Links
Post by: denaon on October 02, 2006, 05:25:22 pm
I plan on updating the mod after I finish the gallery system. I will make it multipe languages for the link system.
Cool, thanks...I'll be waiting for it then  ;)
Title: Re: SMF Links
Post by: Gourgi on October 05, 2006, 06:31:40 am
Hello from Greece!
First of all thanks SMFHacks.com for all this great mods !!!
I you use lots of them with no problems  ;D

Second thanks to user ~!~ (http://www.smfhacks.com/index.php?action=profile;u=147) for altering tha code of SFM Links Mod so that supports UTF-8.
I tested it and really works fine with greek charset !
Thanks man  ;)

Ok now my question :
I 'm running TP v0.95 + SMF 1.1 RC3 + lots of mods ...
Is there a way to include SMF Links Mod in the search box ??  ???
I want the search results to include the title and/or the url and/or the description of the links that users post in the categories of SMF Links Mod.

Title: Re: SMF Links
Post by: SMFHacks on October 05, 2006, 07:01:31 am
Can you show me the user did to alter it to make it work for UTF-8 or post a copy of it?

As for the search box, I am not sure if I would want to combine the the search results for the forum and the links page. I could see adding a search for the links page but not sure if it is a good idea to combine with it with the forum results.
I could put possibbly put two sets of results on the search page such as links results first then the normal forum search results.
Title: Re: SMF Links
Post by: Gourgi on October 05, 2006, 09:38:12 am
the code for utf-8 is in this thread (page 4) !!!!  here (http://www.smfhacks.com/index.php/topic,46.msg325.html#msg325)
i simply changed the code as he suggests  ;)

as for the search , i don't know which method is better ...
i just want to be able to search inside the links names or their description !
if you can place a search button/fuction exclusively for the SMF Links Mod , that's OK for me !
you decide what is better.
i'm looking forward for an updated SMF links MOD with search function  ;D to be released  !!!
how long i 'll have to wait ?  ::)   ;D
thx for reply
Title: Re: SMF Links
Post by: SMFHacks on October 05, 2006, 09:49:22 am
Hmm that fix won't work for me because it leaves your site open to database and pages to script injections. But I have idea on how to fix that.
Title: Re: SMF Links
Post by: Devilicious on October 13, 2006, 06:27:13 am
Hi hope someone can help me.
I've installed the links mod, but if I click on the Links tab (mainpage) it says Unable to load the 'main' template
Does someone know how to fix this?
Thanx for any help.
Title: Re: SMF Links
Post by: SMFHacks on October 13, 2006, 07:48:10 am
Make sure that links.template.php is in your themes folder.
Title: Re: SMF Links
Post by: Devilicious on October 13, 2006, 08:10:29 am
Make sure that links.template.php is in your themes folder.

Link.template.php is in my Themesfolder  :(
Title: Re: SMF Links
Post by: SMFHacks on October 13, 2006, 08:15:41 am
Can i have a link to to your site?

Also put the the template in the default folder as well.
Title: Re: SMF Links
Post by: Devilicious on October 14, 2006, 02:54:56 am
Thnks for your help :)

Link to my site http://www.devilicious-graphics.com/paintforum (http://www.devilicious-graphics.com/paintforum)

Title: Re: SMF Links
Post by: karlbenson on October 16, 2006, 02:06:48 pm
great feature.

Sub categories on the links system would be useful.  And maybe a better way of displaying the categories.

PhpLinkdirectory.com is the sort of layout which would be gr8.
Title: Re: SMF Links
Post by: SMFHacks on October 16, 2006, 02:09:02 pm
Yeah, I plan on redoing the look of the links system once I get a chance.
Title: Re: SMF Links
Post by: Jump1979man on October 18, 2006, 07:07:20 pm
Could you possibly update the Links mod as well to show what category the submission is in before an approval?  Thanks.


Wondering if you could also change the links mod so that you can edit a submitted link to change the location where it is placed?  Right now you cant change it.  Thanks.
Title: Re: SMF Links
Post by: Leo on November 06, 2006, 03:57:21 am
Why I have this problem ? No links show  ??? ???
(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Frealsol.org%2FScreenHunter_001.jpg&hash=0caa1629e6b528f2f7a9c1c1b2c451c719694b6f)
Title: Re: SMF Links
Post by: GameSocket on November 06, 2006, 04:04:36 am
Because even though there is a setting for guests to add links....they cannot.

If a guest adds a link it counts in the number of links..but nothing shows. It was something that was pointed out at the start but its not yet been upgraded.

Umm Im assuming thats what has happened.

Sorry Leo.
Title: Re: SMF Links
Post by: Leo on November 06, 2006, 04:13:39 am
But I have added a link and I was logged like an admin  ??? And my guests can not add links.
Title: Re: SMF Links
Post by: GameSocket on November 06, 2006, 04:38:35 am
I don't know then. Thats what I got when I was adding others links...with their email and and site info
Title: Re: SMF Links
Post by: Jump1979man on November 06, 2006, 10:22:16 am
smfhacks,

has this been updated to include banner images in links yet?  I thought at one point early in development you said you were going to add that.
Title: Re: SMF Links
Post by: SMFHacks on November 06, 2006, 11:05:55 am
smfhacks,

has this been updated to include banner images in links yet?  I thought at one point early in development you said you were going to add that.
Not yet been busy lately. Maybe once SMF 1.1 is released I will update the mods.
Title: Re: SMF Links
Post by: benny on November 08, 2006, 09:58:04 pm
SMF Links is one of the most useful mods I have installed.

Can I suggest a few alterations.

How can you see what section a link is submitted to, in the waiting to be approved section?

It would be great if the users could submit a banner to submit, and the admin set the banners features / limits.

I cant see how to move links from one section to another ?


Title: Re: SMF Links
Post by: SMFHacks on November 08, 2006, 09:59:26 pm
SMF Links is one of the most useful mods I have installed.

Can I suggest a few alterations.

How can you see what section a link is submitted to, in the waiting to be approved section?

It would be great if the users could submit a banner to submit, and the admin set the banners features / limits.

I cant see how to move links from one section to another ?



I am in the process of redoing this mod at the moment.
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 01:26:35 pm
Version 1.5
Updated the mod to use language files
Better Guest add link support
New layout display
Added Image category icon option
You can change the category of a link easier now under edit link
Settings to show information on index and bbc control for link descriptions
Pages setting allows you to show how many links per page in a category
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 04:05:13 pm
Version 1.5
Updated the mod to use language files
Better Guest add link support
New layout display
Added Image category icon option
You can change the category of a link easier now under edit link
Settings to show information on index and bbc control for link descriptions
Pages setting allows you to show how many links per page in a category


awesome work...thanks, will try it out now.
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 04:11:04 pm
Due to all my other mods I cannot just uninstall the old version and install this new version....


can I just upload the files over the existing ones to make it work??
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 04:34:07 pm
Yes you can do that. You need to also make sure that Links.english.php is in your themes language folder.

And run these two sql queries on your database
Code: [Select]
ALTER TABLE smf_links_cat ADD `ID_PARENT` smallint(5) unsigned NOT NULL default '0';

ALTER TABLE smf_links_cat ADD `image` tinytext;

Added the following to Modfications.english.php

$txt['smflinks_admin'] = 'Links Configuration';

And one other modification
Find
Code: [Select]
'edit_settings' => '<a href="' . $scripturl . '?action=serversettings;sesc=' . $sc . '">' . $txt[222] . '</a>',Add after
Code: [Select]
'links_settings' => '<a href="' . $scripturl . '?action=links;sa=admin;sesc=' . $sc . '">' . $txt['smflinks_admin'] . '</a>',

Title: Re: SMF Links
Post by: mvbn1 on November 10, 2006, 05:10:19 pm
First off, I want to let you know that this is a great mod! Now for my question. Can you make the listing of links in the categories list in alphbetical order, based on the Title of the link? ... and will it be possibel, maybe in a future update, to make sub-categories within categories?

Again, great mod! Looking forward to seeing the Gallery Pro next.
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 05:48:20 pm
Yes you can do that. You need to also make sure that Links.english.php is in your themes language folder.

And run these two sql queries on your database
Code: [Select]
ALTER TABLE smf_links_cat ADD `ID_PARENT` smallint(5) unsigned NOT NULL default '0';

ALTER TABLE smf_links_cat ADD `image` tinytext;

Added the following to Modfications.english.php

$txt['smflinks_admin'] = 'Links Configuration';

And one other modification
Find
Code: [Select]
'edit_settings' => '<a href="' . $scripturl . '?action=serversettings;sesc=' . $sc . '">' . $txt[222] . '</a>',Add after
Code: [Select]
'links_settings' => '<a href="' . $scripturl . '?action=links;sa=admin;sesc=' . $sc . '">' . $txt['smflinks_admin'] . '</a>',




Did you update that in the downloads area???

Still says----Last Updated: 2006-10-29

I havent done anything to my site yet so I will just download an updated version.
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 05:50:39 pm
Yeah I updated the downloads area for the mod it shows old date since I didn't change the description
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 06:33:01 pm
Quote
And one other modification
Find

Code:
'edit_settings' => '<a href="' . $scripturl . '?action=serversettings;sesc=' . $sc . '">' . $txt[222] . '</a>',Add after

Code:
   'links_settings' => '<a href="' . $scripturl . '?action=links;sa=admin;sesc=' . $sc . '">' . $txt['smflinks_admin'] . '</a>',


where do I find this code?  What file?
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 06:34:48 pm
Forgot its in Subs.php
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 06:36:17 pm
First off, I want to let you know that this is a great mod! Now for my question. Can you make the listing of links in the categories list in alphbetical order, based on the Title of the link? ... and will it be possibel, maybe in a future update, to make sub-categories within categories?

Again, great mod! Looking forward to seeing the Gallery Pro next.
The order you can change by adjusting one query in Links.template.php in the main function.

Subcategories are planned.
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 06:40:32 pm
Quote
ALTER TABLE smf_links_cat ADD `image` tinytext;


image is also already in the table.......what to do now?
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 06:42:58 pm
That's fine I just changed the datatype doesn't matter that much.
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 07:01:21 pm
ok, just got done with the update.....looks like everything went ok.

Is there a way to change the Package Manager to reflect the update to 1.5 instead of it still showing 1.4?

Also this update has the ability to add banners, is that correct?
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 07:10:21 pm
Banner support not added. Just added category image support.
Started to look at banners for links but was a little complex.

Well you could change the version number in the package number but it won't do anything since it is tied to the old files anyway.
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 07:12:39 pm
The top hits show the rating and the top rated show the hits....its backwards from what it was before....is this by design?


it is also screwing up the Tiny Portal....it didnt do this before...

is there a way to make it look like it did before the update?

Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 07:14:41 pm
Banners work ok with the BBC code...so no problem there.  Thanks.

I would like to show you what I am talking about in terms of it not looking right.....and screwing up the Tiny Portal which it wasnt doing before...

http://www.mwmotorcycles.com/forum/index.php?action=links;cat=4
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 07:29:45 pm
Banners work ok with the BBC code...so no problem there.  Thanks.

I would like to show you what I am talking about in terms of it not looking right.....and screwing up the Tiny Portal which it wasnt doing before...

http://www.mwmotorcycles.com/forum/index.php?action=links;cat=4
That happens because the banner is too large and making the screen expand.
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 07:32:46 pm
Banners work ok with the BBC code...so no problem there.  Thanks.

I would like to show you what I am talking about in terms of it not looking right.....and screwing up the Tiny Portal which it wasnt doing before...

http://www.mwmotorcycles.com/forum/index.php?action=links;cat=4
That happens because the banner is too large and making the screen expand.

I removed the banner and it basically looks the same....I am talking about the big huge white box at the top that says the category name and also the fact that the links area themselves are on top of the left side of my Tiny Portal.....it didnt used to be like this.


I liked how it looked before....is there a way to go back to that look and keep the new features?
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 07:39:27 pm
I got a fix for it. Redownload smflinks and upload Links.template.php again.
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 07:47:58 pm
I got a fix for it. Redownload smflinks and upload Links.template.php again.

AWESOME!!!  Looks much better now!  Thanks....

about that one question I had on the top sites and top rated being backwards....

was that by design?
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 07:49:23 pm
Nope it wasn't! Good catch!
Title: Re: SMF Links
Post by: SMFHacks on November 10, 2006, 07:54:19 pm
Updated with the fix for Links.template.php
Title: Re: SMF Links
Post by: Jump1979man on November 10, 2006, 08:01:25 pm
Updated with the fix for Links.template.php

Works great...thanks!
Title: Re: SMF Links
Post by: stefanp on November 15, 2006, 06:43:58 am
I donwloaded last version ... looks great, works great !

But i have a problem with add links under MS-IE7 (maybe a special feature of IE7 *gg*)

Theres something wrong with the links.template.php i think.
The title of url-field is placed in the dropdown of categorie.
The url-field is out of the table

with firefox the add-link-screen works perfect !

check out attached image.

(hmmm i cant see attached image .... if you cant see it too use >> that link << (http://stefan.pachlina.net/cms/images/smf-links.jpg) )
Title: Re: SMF Links
Post by: SMFHacks on November 15, 2006, 08:43:40 am
Bah I will check it out tonight. Is it under edit links too?

Time to download IE7 lol.
Title: Re: SMF Links
Post by: rbh on November 15, 2006, 08:50:26 am
how would i go about changing the background color? it is pulling from my forum stylesheet but as you can see from this picture it blacks everything out. i figure i need to change something within the template but not sure what. thanks


ok, image attachments arent showing here so i uploaded it elsewhere.

(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv13%2Fratherbehunting%2Fgeneraluse%2Flinkspage.jpg&hash=46ef890884cd4a8c92a9496582184a10a706d2bc)
Title: Re: SMF Links
Post by: SMFHacks on November 15, 2006, 03:45:24 pm
You would need to edit Links.template.php if remember it takes catbg titlebg and windowbg2 as the classes for css.
Title: Re: SMF Links
Post by: stefanp on November 17, 2006, 02:01:43 pm
Bah I will check it out tonight. Is it under edit links too?

Time to download IE7 lol.

No, edit links looks nice :)
Title: Re: SMF Links
Post by: doc-com on November 18, 2006, 06:59:48 pm
I'm using SMF 1.1 RC3; just upgraded to it yesterday and then installed the Dilber MC theme

Just installed SMF Links mod - no problems; then added category, and added a link and approved it.

Links button displays in forums default theme, but not in Dilber MC which is what the forum uses.

I must've missed something somewhere, how do I get the button to display in Dilber MC
Title: Re: SMF Links
Post by: SMFHacks on November 18, 2006, 07:03:38 pm
All mods only install on the default theme to make it work on others you need to create a button or link and modify the code in index.template.php of the theme you are using.
Title: Re: SMF Links
Post by: doc-com on November 18, 2006, 07:58:05 pm
Ok, I can admin a forum, but I'm a novice at .php scripting - what script do I need to change  ???
Title: Re: SMF Links
Post by: SMFHacks on November 18, 2006, 08:17:41 pm
Index.template.php in DilberMc theme.
Title: Re: SMF Links
Post by: doc-com on November 18, 2006, 08:43:39 pm
can you tell me what I actually edit in Dilber Index.template.php as I don't know what script goes where

If you could give me step by step I'll give it a go   :-\
Title: Re: SMF Links
Post by: SMFHacks on November 18, 2006, 09:19:05 pm
I don't know the coding of the theme.You would need to post the file here.
Title: SMF Links in Dilber MC theme SMF 1.1 RC3
Post by: doc-com on November 18, 2006, 10:08:54 pm
Thanks SMFHacks

I sort of rough 'I love SMF' it ....



I copied this from the default Index.template.php

// the [links] button
   if ($context['allow_view_smflinks'])
      echo ($current_action == 'links' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="center" class="menubg' , $current_action == 'links' ? '2' : '' , '">
               <a href="', $scripturl, '?action=links">' , $txt['smflinks_menu']  , '</a>
            </td>' , $current_action == 'links' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';



and pasted into the Dilber Index.template.php 
then altered to match other Dilber menu items as such;

// the [links] button
   if ($context['allow_view_smflinks'])
      echo'
            <td align="center" class="menubg' , $current_action == 'links' ? '2' : '' , '">
            
               <a href="', $scripturl, '?action=links">' , $txt['smflinks_menu']  , '</a>
            </td>';


note: make sure to change <td valign to <td align to have text centered horizontally instead of vertically.

 

then added 'links' to this section

// Work out where we currently are.

   $current_action = 'home';

   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))

$current_action = 'admin';

   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'links')))

      $current_action = $context['current_action'];

   if ($context['current_action'] == 'search2')

      $current_action = 'search';

   if ($context['current_action'] == 'theme')

      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';



anyhow, it seems to work ok, can you see any faults ?

.
Title: Re: SMF Links
Post by: SMFHacks on November 18, 2006, 11:01:44 pm
That's the code looks good from what I see.
Title: Re: SMF Links
Post by: tambitch on November 20, 2006, 06:20:05 am

Theres something wrong with the links.template.php i think.
The title of url-field is placed in the dropdown of categorie.
The url-field is out of the table

Go to Links.templete.php and search for:

Code: [Select]
$row['ID_CAT'] == $catid) ? 'selected="selected" ' : '') .' ">'
replace with:

Code: [Select]
$row['ID_CAT'] == $catid) ? 'selected="selected" ' : '') .'>'
There is an extra " in the optionmenu that throws off the display.
Title: Re: SMF Links
Post by: Rasyr on November 20, 2006, 07:18:01 am
I really like this Mod, and so do my users, however, there are a few requests for changes/improvements coming in from them.

Several of my forum users wish that the Links manager would allow for links to be in multiple categories without having to enter the link multiple times.

Another request is some sort of control on it, so that folks cannot click on a link multiple times within a specified time frame (i.e. artificially increasing the # of visits count)

Top Five lists - another request came in from my users to allow for changing the number of links in the Visits and the Ratings lists, and to be able to paginate them when there are too many (i.e. they want to go through and be able to look at all of the links in order). -- Note: for this one, I just added a new sub-action which takes them to a page that shows all of the links in 2 lists (Rated and Hits). You can see this on my site at http://www.ironcrown.com/ICEforums





I told them that I would ask.....
Title: Re: SMF Links
Post by: stefanp on November 22, 2006, 07:44:54 am
thx - with the above code the "add-links-form" rox now ;)
Title: Re: SMF Links
Post by: SMFHacks on November 22, 2006, 08:26:46 am
Thanks updated the mod with the fix.
Title: Re: SMF Links
Post by: Caspar107 on November 24, 2006, 07:31:57 am
When I install it, I get the following error message

Code: [Select]
Fatal error: packageinstall() [function.require]: Failed opening required '/home/dutchmilli/domains/dutch-military.nl/public_html/schuuring/Packages/temp/./linksql.php' (include_path='.:/usr/local/lib/php') in /home/dutchmilli/domains/dutch-military.nl/public_html/schuuring/Sources/Packages.php on line 540
Title: Re: SMF Links
Post by: Caspar107 on November 24, 2006, 03:24:53 pm
Never mind, forgot to chmod to 777
Title: Re: SMF Links
Post by: SMFHacks on November 24, 2006, 09:13:56 pm
Version 1.6
Sorting of links on link display.
Added new layout for the admin panel.
Separated settings, categories, category permissions and approve links to their own sections in the admin panel.
Added page listing to approve links.
Added category level permissions for adding, editing, deleting and viewing links.
Added settings to toggle what information is shown on link display
Added Subcategories
Started basic support for Alexa and PageRank still need to make the functions work.
Title: Re: SMF Links
Post by: Jump1979man on November 25, 2006, 01:26:59 pm
If permissions are already set for each group do we still need to give permissions within the links mod itself?


when I checked the actual admin permissions it took away all my group permissions to only allow view links....

now what happens when I click them all again that I originally had set?


What has more power, the links permissions in the links mod or the admin permissions in the admin cp?

There are also many more options for permissions in the admin cp rather than just the 4 in the links mod permissions....why?
Title: Re: SMF Links
Post by: SMFHacks on November 25, 2006, 01:34:37 pm
You do not need reset the permissions. The category permissions are if you want to disable a global permission on a category level.
Title: Re: SMF Links
Post by: doc-com on November 25, 2006, 06:36:16 pm
Hi,
 just installed SMF Links 1.5 last week into Dilber MC theme

V 1.6 sounds good, sub-categories and sorting display is just what we need - good work people...


Anywhow, I've uploaded 1.6 to our forum, but it recommends I uninstall the old version or get an upgrade version to install?

If I uninstall 1.5, do we lose the existing links?

Whats the best way to upgrade to 1.6
Title: Re: SMF Links
Post by: SMFHacks on November 25, 2006, 06:37:56 pm
I would unstiall since new tables are created and tables altered.

All links and information will remain if you unistall the old version so you are safe.
Title: Re: SMF Links
Post by: doc-com on November 25, 2006, 07:47:43 pm
Thanks SMF Hacks,
1.6 works a treat - I'm sure the members will love it too  ;D

one problem I just noticed; when I log out and visit as a guest, i'm unable to view any links in the categories, just get this message
Quote
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

This is despite having approval in membergroup permissions; I've added the link category permissions and that makes no difference, guest still can't view or add links.

I also changed theme back to default, but problem still exists

Title: Re: SMF Links
Post by: Jump1979man on November 25, 2006, 11:49:36 pm
yep....

Quote
Database Error
Please try again. If you come back to this error screen, report the error to an administrator. 


me too.....something is wrong with the mod.
Title: Re: SMF Links
Post by: SMFHacks on November 26, 2006, 09:38:58 am
Fixed updated the mod.
Fix added to Links.php
Title: Re: SMF Links
Post by: Jump1979man on November 26, 2006, 12:49:00 pm
thanks works now...
Title: Re: SMF Links
Post by: doc-com on November 26, 2006, 07:42:16 pm
Do I un-install version 1.6, then re-install the new fixed version of it;
or do I just upload the new files to server?
Title: Re: SMF Links
Post by: SMFHacks on November 26, 2006, 08:01:01 pm
You can just upload Links.php if you want to.
Title: Re: SMF Links
Post by: doc-com on November 27, 2006, 05:22:12 pm
thanks, but to which folder does it go?
 
As of yesterday I now have a screwed up installation of SMF after the datacentre the site is hosted on had a power failure, followed by a generator failure and all day outage, so I'm trying to fix that as well, and not having much luck  :(
Title: Re: SMF Links
Post by: SMFHacks on November 27, 2006, 05:31:26 pm
Links.php goes to your sources folder in your SMF Forum.
Title: Re: SMF Links
Post by: doc-com on November 27, 2006, 11:46:08 pm
Many thanks,
got SMF forum working again and Links as well

 ;D
Title: Re: SMF Links
Post by: matthen on January 04, 2007, 07:38:28 am
I've just started using smf links on my website:
http://www.poweriserpages.com/links
Really happy with it- except one thing.
In the Total Links column, it does not count the links within the categories contained within the category.

e.g. if my categories are

main1
   sub1

and if sub1 has 30 links in it, and there are no other links in the system- on the main page it says the total links in main1 is 0.

Is there any code I can insert to make it count the links in subcategories?

Thanks,

Matt
Title: Re: SMF Links
Post by: SMFHacks on January 04, 2007, 08:26:08 am
I could something for that uses extra queries though. For one level sub level to count on the parent.
Title: Re: SMF Links
Post by: matthen on January 04, 2007, 10:19:26 am
Yeah, if you could that'd be great. It'd only need to count links down to the first level subcategory.
Title: Re: SMF Links
Post by: Jase on January 04, 2007, 05:58:41 pm
Im actually having the exact same problem on my forum. And also the Page Rank and Alexa Rank stay at 0 too. Any help would be VERY much appreciated.  :)
Title: Re: SMF Links
Post by: SMFHacks on January 04, 2007, 06:19:23 pm
Page Rank and Alexa do not work yet.
Title: Re: SMF Links
Post by: Jase on January 04, 2007, 06:21:20 pm
Page Rank and Alexa do not work yet.

Oh okay :)

Any idea when they will be available? You have the best mods :)
Title: Re: SMF Links
Post by: SMFHacks on January 04, 2007, 06:49:00 pm
Not sure I have a couple other mods I am working on at the moment. Need to figure out why alexa and pagerank are not working.
Title: Re: SMF Links
Post by: matthen on January 07, 2007, 02:20:20 pm
So anything about counting subcategory links?
Title: Re: SMF Links
Post by: SMFHacks on January 07, 2007, 02:47:25 pm
In the future. If it is urgently needed you can make a donation and I can work on it faster.
Title: Re: SMF Links
Post by: matthen on January 07, 2007, 04:28:12 pm
Ok I'll guess I'll have a go at coding it.
Shall I post the patch here?
Title: Re: SMF Links
Post by: makphisto on January 15, 2007, 04:43:19 pm
I can't seem to get it set up so that anyone but me can see the links.  When logged in as Admin, I can see them, but if I'm a guest, or logged in as a member, I get "An Error Has Occurred!"  I'm using the most recent download, and SMF 1.1.1.

Also, this is my first package to install - should I have a link somewhere in Admin to be able to click to admin the links?

Thanks.
Title: Re: SMF Links
Post by: SMFHacks on January 15, 2007, 04:51:30 pm
Goto Permissions and make sure they each group has permissions to view links or add links if you want them to.
Title: Re: SMF Links
Post by: Raven on January 21, 2007, 02:20:24 am
I love this mod, it works great! You've done a fantastice job with this :)

I would also agree about the number of links (shown) in the parent catagory being very misleading when it shows (0) links, yet in subdirectories inside there could be hundreds.  so when users see the 0 they won't bother to look. Also under 'Stats', it only counts the first main catagories but none of the sub catagories inside them. ;)

Also something that would be VERY useful are buttons(or links) to navagate between catagories(such as 'Up one level', 'Down one level' or even just a 'Back' button or link :)

Keep up the good work! :)
Title: Re: SMF Links
Post by: benny on January 24, 2007, 10:12:02 pm
Here is how I have arranged SMF Links
http://machsupport.com/forum/index.php?action=links
Title: Re: SMF Links
Post by: SMFHacks on January 24, 2007, 10:15:56 pm
Here is how I have arranged SMF Links
http://machsupport.com/forum/index.php?action=links
Looks good!

I noticed you had two links button if you want that fixed ask me. Its in index.template.php the button was created twice.
Title: Re: SMF Links
Post by: benny on January 26, 2007, 06:37:36 am
Yeh the two links buttons is a drag, Its just a matter of my lazyness to try and find where to edit.
I have found your links mod fantastic. The main reason is because I am asking others to also host my link as a trade off.
I recon I have my link on 50 sites now. This really helps with my google listing.
Title: Re: SMF Links
Post by: tones_ie on January 27, 2007, 01:17:30 am
where do i edit to get the button text to change from "links" to say bookmarks....

thanks in advance

@ benny...very nice use of the mod...
Title: Re: SMF Links
Post by: SMFHacks on January 27, 2007, 08:37:06 am
Try modifications.english.php or links.english.php
Title: Re: SMF Links
Post by: caliope on March 30, 2007, 08:02:19 pm
This is a great mod, thanks.

it has just been installed and i have managed to get it working correctly.

One question.... is it possible to re-set all counters to zero as I have had to click links and rate sites to check they work?
Title: Re: SMF Links
Post by: SMFHacks on March 30, 2007, 08:09:26 pm
It is but you would need to edit the database via phpmyadmin or another way. Then open the smf_links table and find the links to update.
Title: Re: SMF Links
Post by: caliope on March 31, 2007, 10:30:08 am
OK thanks for the reply  :)
Title: Re: SMF Links
Post by: mdshare on March 31, 2007, 09:48:44 pm
Page Rank and Alexa do not work yet.

just remove the alexa.php and change at links.php the following function

Code: [Select]
function GetAlexaRank($url)
{
global $modSettings,$sourcedir;
if($modSettings['smflinks_setgetalexa'])
{
$aadress = 'http://data.alexa.com/data/+wQ411en8000lA?cli=10&dat=snba&ver=7.0&cdt=alx_vw%3D20%26wid%3D12206%26act%3D00000000000%26ss%3D1680x16t%3D0%26ttl%3D35371%26vis%3D1%26rq%3D4&url='.$url;
preg_match ( '/TEXT=\"(\d+)\"\/>/', file_get_contents ( $aadress ) , $ainfo ) ;
if ( empty ( $ainfo[1] ) )
{
$rank = '-';
}
else
{
$rank = $ainfo[1] ;
}


return $rank;
}
else
return 0;

}

should work perfect, next I do the google pagerank -file is way to big- , should be a few lines like the alexa function, I'll add a yahoo one also by tomorrow or so

Quote
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

This error is because you try to insert a non numeric character at the alexa field (db smf_links table) as it is set as int(10) just change the field to avoid this error easy
Title: Re: SMF Links
Post by: SMFHacks on April 01, 2007, 06:09:16 pm
Good work. The thing with alexa they will start to block your ip if you do many queries. I wanted to use the offical alexa request with their api key for alexa.
Title: Re: SMF Links
Post by: mdshare on April 02, 2007, 01:32:57 pm
didn't had time yet to focus on the rest

and about alexa... doubtfull they will block IPs but can always be

A next part at your code should be adding a cronjob so that the alexa/gogle/etc ranks get once a day updated.

Title: Re: SMF Links
Post by: lettiehatter on April 07, 2007, 12:09:24 am
I guess I suck at installing or something because I'm having a few problems. I downloaded the mod and uploaded the zip file using the admin panel. I'm using the default theme.

1. Permissions page - check boxes with no text telling what they're for.

I saw someone else had this problem, so I checked my 'modifications.english.php' but it already has the code for the descriptions. Is there another file I should check?

2. There's no menu link.

I also saw this problem posted here, so I checked 'index.template.php' but it looks like it has the code for a menu link.

I'm really confused. I don't know what I've done wrong. I'm not very good at this code stuff. Any help would be appreciated.

EDIT: forgot to mention I'm using ver 1.1.2
Title: Re: SMF Links
Post by: baggy on April 15, 2007, 10:47:32 am
i hav set up links so that all members and guests can view them,
but wen anyone except me tries to view the links, they get the message, "Error has occured"
Title: Re: SMF Links
Post by: jayc on April 21, 2007, 04:17:53 pm
I guess I suck at installing or something because I'm having a few problems. I downloaded the mod and uploaded the zip file using the admin panel. I'm using the default theme.

1. Permissions page - check boxes with no text telling what they're for.

I saw someone else had this problem, so I checked my 'modifications.english.php' but it already has the code for the descriptions. Is there another file I should check?

2. There's no menu link.

I also saw this problem posted here, so I checked 'index.template.php' but it looks like it has the code for a menu link.

I'm really confused. I don't know what I've done wrong. I'm not very good at this code stuff. Any help would be appreciated.

EDIT: forgot to mention I'm using ver 1.1.2

I am also using 1.1.2 and have exactly the same problems, had the same problem when intalling Gallery Lite, but found a how2 for fixing it and followed it step by step (painfully) and was able to get it working.

Sad to say I forget to write things down and cannot find the how2 for gallery lite to attempt the same fix for Links, will have to stick to my outboard links page for a while longer.

If you ever get a responce please send me a copy

jayc@wyldeart.com

Edit  :'(

I either have way too much time on my hands, or I don't know when to quit, I came back this morning and was able to find the Gallery discussion at
http://www.smfhacks.com/index.php/topic,693.0.html (http://www.smfhacks.com/index.php/topic,693.0.html)

Continuing to tinker, unzipped the distribution locally and found simlar code for Links in:
links109.xml

After trying a couple of fixes that did not work I did a cut and paste of the following into my test site in the Modifications.english-utf8.php file for the default theme, and now it is apparently working.  Going to try going through the same steps for my production sites.

This is the second SMFHacks module that was supposed to be 1.1.2 compatable, and did not work out of the box, my suggestion would be for creation of a moderated FAQ forum for each of the modules available here to help out the guys like myself who really don't understand all this Magick stuff

Code: [Select]
//Begin SMF Links Text Strings
$txt['smflinks_menu'] = 'Links';
$txt['smflinks_admin'] = 'Links Configuration';
$txt['permissiongroup_smflinks'] = 'SMF Links';
$txt['permissionname_view_smflinks'] = 'View Links Page';
$txt['permissionhelp_view_smflinks'] = 'Sets if the user can view the links page.';
$txt['cannot_view_smflinks'] = 'You can not view the links page.';
$txt['permissionname_add_links'] = 'Add Links';
$txt['permissionhelp_add_links'] = 'If the user is allowed to submit links';
$txt['cannot_add_links'] = 'You can not add links.';
$txt['permissionname_edit_links'] = 'Edit Links';
$txt['permissionhelp_edit_links'] = 'If the user is allowed to edit links';
$txt['cannot_edit_links'] = 'You can not edit links.';
$txt['permissionname_delete_links'] = 'Delete Links';
$txt['permissionhelp_delete_links'] = 'If the user is allowed to delete links';
$txt['cannot_delete_links'] = 'You can not delete links.';
$txt['permissionname_approve_links'] = 'Approve Links';
$txt['permissionhelp_approve_links'] = 'If the user is allowed to approve links';
$txt['cannot_approve_links'] = 'You can not approve links.';
$txt['permissionname_links_auto_approve'] = 'Links Auto Approved';
$txt['permissionhelp_links_auto_approve'] = 'If the users links are auto approved when submitted.';
$txt['permissionname_rate_links'] = 'Rate Links';
$txt['permissionhelp_rate_links'] = 'If the user is allowed to rate links';
$txt['cannot_rate_links'] = 'You are not allowed to rate links.';
$txt['permissionname_links_manage_cat'] = 'Manage Categories';
$txt['permissionhelp_links_manage_cat'] = 'User can add/remove/edit/reorder categories';
$txt['cannot_links_manage_cat'] = 'You are not allowed to manage categories.';
//END SMF Links Strings

 :P Re-Edit
Well the fix worked on the first of my prduction sites, except that, while I could now see the permissions text in the admin panel, and I could got to links from the browser by manually entering http://MyDomainName.com/SMF/index.php?action=links into the navigation bar, still no links button on the menu line. It is there on my test site, which is using the default theme, but not on the production site with a custom theme.

Fix for this was pretty easy;

I opened index.template.php for the custom theme, and did a seach for // the [SMF Gallery] button

I inserted the following code (which I found in the index.template.php for the default theme, just before the // the [SMF Gallery] button code.

Code: [Select]
// the [links] button
if ($context['allow_view_smflinks'])
echo ($current_action == 'links' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'links' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=links">' , $txt['smflinks_menu']  , '</a>
</td>' , $current_action == 'links' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

Remember you have to go to permissions in the Admin panel and set permissions for your user groups
Title: Re: SMF Links
Post by: GameSocket on April 22, 2007, 06:39:05 am
i hav set up links so that all members and guests can view them,
but wen anyone except me tries to view the links, they get the message, "Error has occured"

I get the same thing baggy.

Whats going on with this. Nup. Not working on 1.1.2.

Report that mod
Title: Re: SMF Links
Post by: GameSocket on April 22, 2007, 05:19:39 pm
Ok..Don't want to be mean, but I uninstalled this and installed the one from SMF Mod site and it installed clean.

Baggy.. you have to set board permissions in your admin for it to be available to guests and members
Title: Re: SMF Links
Post by: Harro on May 07, 2007, 07:14:45 am
What exactly is the newest version of this mod?
Been using it for quit some time on my forum without any problems.
But was curious if there are any updates.
According to the admin panel I'm running 1.6.3
IS there already a new version?
Also perhaps a good idea to put the version number in the package name.

And maybe a weird question. But would it be possible to install the mod more then 1 time on the forum?
Could use it for a couple things on my forum, but needs to be a seperate directory each time (and not a sperate category).


[edit]
Just took a look at package-info.xml and it seems that 1.6.3 is the newest version.
Shoul've looked at it before asking here ;)
But another question then: any news on the alexa en pagerank?
Title: Re: SMF Links
Post by: SMFHacks on May 07, 2007, 07:22:44 am
Alexa I could include if needed.
Remember that Alexa charges for each query. .15 cents for every 1000 queries.
Title: Re: SMF Links
Post by: Harro on May 07, 2007, 07:57:52 am
Nevermind then  :P
And no plans to get that pagerank working then?
I'm currently modifying the template to suit my needs. And if there are no plans to add the pagerank I'll just remove that column in the template.

Just finished the modifications of the template file: http://www.forumaffiliates.net/links.html
Feel free to let me know what you think of it :)
Title: Re: SMF Links
Post by: Kissmymutt on May 19, 2007, 10:56:29 am
Hi there.. was anyone ever able to find a solution to this?  It's my only tiny issue.. otherwise I LOVE this mod..

In the Total Links column, it does not count the links within the categories contained within the category.

e.g. if my categories are

main1
   sub1

and if sub1 has 30 links in it, and there are no other links in the system- on the main page it says the total links in main1 is 0.

Is there any code I can insert to make it count the links in subcategories?

Thanks,

Matt
Title: Re: SMF Links
Post by: khvitaliy on May 31, 2007, 07:58:36 pm
I had to install manually I have an access to smf links from control panel, but it's nowhere to be seen on the homepage. www.developprofit.com/money_forum

Thanks
Title: Re: SMF Links
Post by: SMFHacks on May 31, 2007, 08:30:15 pm
You will need to install it on the index.template.php of your custom theme.
Title: German language file
Post by: jpb on June 05, 2007, 04:07:02 pm
Version 1.5
Updated the mod to use language files

I installed SMF Links on SMF 1.1.2 / TP 0.9.8 / Delta-Theme / German. Because my language is German, I can't see most of the options. Can I download a German language file? Alternatively I would like to see the English words. How can I do it?

jpb
Title: Re: SMF Links
Post by: SMFHacks on June 05, 2007, 06:44:18 pm
Copy modifications.english.php to modifications.yourlanguage.php
Title: Re: SMF Links
Post by: jpb on June 06, 2007, 05:55:14 am
I copied from Themes/default/language

index.template.php
links.template.php
Modifications.english.php (renamed to Modifications.german.php)

to Themes/Delta_11final_tp/language (my actual theme folder).

Is this right?

jpb
Title: Re: SMF Links
Post by: stormlrd on June 06, 2007, 06:04:43 am
yes but did you replace a file in that folder with this change? in other words did the file exist in delta theme folder i dont remember, if so i hope you got the txt labels off it and added it to the other first. Basically the modification.language file carries the txt strings for a theme, if none exist in a new theme on your site, than it falls back on the default theme language file. However if the language file does exist in the theme your modifying than its there because it has strings needed for the theme and you need to carrry them over to your replacement file.
Title: Re: SMF Links
Post by: jpb on June 06, 2007, 06:18:21 am
The file did not exist in den delta theme folder.

I don' t know what to do now? I could't find a description or a manual.

jpb
Title: Re: SMF Links
Post by: stormlrd on June 06, 2007, 06:19:55 am
Ok kool your alright than. Now you just need to open that file and translate the english text to german text as you can and your all set.
Title: Re: SMF Links
Post by: jpb on June 06, 2007, 06:36:22 am
That will be no problem.

My problem is, how to use SMF Link.

I have the Link "Links Configuration".
Then I see "Link settings": It explains itself.
"Manage Categories". No Prolblem (I added categories and links).
"Approve Links": I just see "Url Title Description Category Submitted by: Pagerank Alexa Options" Nothing else.
"Category Permission List": I just see "Member Group Name Category View Add Link Edit own Link Delete own Link Options". Nothing else.

How can a member create Links? How can I set permissions?

Thanks for your help!

jpb
Title: Re: SMF Links
Post by: rider on June 06, 2007, 03:55:48 pm
That will be no problem.

My problem is, how to use SMF Link.

I have the Link "Links Configuration".
Then I see "Link settings": It explains itself.
"Manage Categories". No Prolblem (I added categories and links).
"Approve Links": I just see "Url Title Description Category Submitted by: Pagerank Alexa Options" Nothing else.
"Category Permission List": I just see "Member Group Name Category View Add Link Edit own Link Delete own Link Options". Nothing else.

How can a member create Links? How can I set permissions?

Thanks for your help!

jpb

Look in permissions for the membergroup and you'll see the option for the links mod
Title: Re: SMF Links
Post by: jpb on June 06, 2007, 03:59:13 pm
5 Minutes ago, I got it! Thank you. It was so easy!!!

jpb
Title: Re: SMF Links
Post by: jpb on June 06, 2007, 04:12:12 pm
I still have a problem.
This ara my Category Permission List:

Member Group Name              Category                    View     Add Link    Edit own Link    Delete own Link    Options
Unregistrierte Gäste [Guests]  Fächerübergreifendes   Allowed  Denied       Denied              Denied

Guests should see the Links. In the main menue I have a link to "http://www.kerncurricula.de/index.php?action=links". This is the answer when I am not loged in (so I am a guest): "You can not view the links page. Bitte einloggen oder ein neues Benutzerkonto im Forum Kerncurriculum Niedersachsen registrieren." [You have to log in ...]

Why guests can't see the Links?

jpb
Title: Guests can't see Links
Post by: jpb on June 09, 2007, 05:36:04 am
Please help! Guests can't see Links. Details see previous post.

jpb
Title: Re: SMF Links
Post by: SMFHacks on June 09, 2007, 06:10:10 am
Admin -> Permissions ->
Find Guests click Modify give them View Links permission.
Title: Re: SMF Links
Post by: jpb on June 09, 2007, 07:41:13 am
Thank you!!!

jpb
Title: Re: SMF Links
Post by: Mannie on June 19, 2007, 09:15:03 am
Is it possible for the links to use the snapshots from snap dot com. I have that on my tp and forum, but for the links it don't show. If so how do i do that ? ;)
Title: Links Approval Section Template Problem
Post by: 7forward on July 11, 2007, 11:50:56 pm
Hello,

I've now got the SMF links mod working great except for ONE LAST DETAIL with the admin template...

[img src=http://www.realestatemarketingforum.com/links_approval_section.gif][/img]

When admin clicks on Approve Links the template breaks our to the right as shown above.

Where & how do I fix this? links.template.php? index.template.php?

Help please!!!

Thanks.
Title: Re: SMF Links
Post by: 7forward on July 12, 2007, 12:05:13 am
found & fixed problem...

in Links.template.php find this code section:

function template_approvelinks()

then find & change this:  </tr>';

to this:  </tr></table>';

presto chango.
Title: Re: SMF Links
Post by: runt on July 18, 2007, 07:37:30 pm
ok, just installed that on my clan's forums tonight and i cannot see the text for it.  anyone know what could cause this?
Title: Re: SMF Links
Post by: SMFHacks on July 18, 2007, 08:45:18 pm
Copy text strings from themes/default/languages/modifications.english.php
To your custom theme file
 themes/yourtheme/languages/modifications.english.php

If my you have more than one language repeat the process and copy to every
 themes/yourtheme/languages/modifications.*.php
Title: Re: SMF Links
Post by: miko on August 22, 2007, 09:17:03 pm
*never mind.  Thanks
Title: Re: SMF Links
Post by: Mentalist on August 24, 2007, 12:01:01 pm
Not yet I might add comments/reviews in next version. Trying to see the scope of this links project heh.

SMFHacks.com

Hi.

Any word on whether there will be the option to comment on links?

Thanks.
Title: Re: SMF Links
Post by: mogu on September 09, 2007, 02:10:20 pm
Hi there,
I like that Mod very much, it's been easy to customize and everything.
Keep up the good work!

Just one thing I'd like to see fixed (and I'm sorry if it has been mentioned before): the description field is originally limited to 255 characters. however there's no warning for the user - the text is just cut-off in the db and that leaves an unhappy user ...
IMHO most/many really useful link directories have longer descriptions for their links - and not everybody knows how to edit stuff in their db without breaking anything :). 

have a nice day!
Title: Re: SMF Links
Post by: GameSocket on October 01, 2007, 10:14:10 pm
Sorry to bump up something so old. But I have been hit by something in my links.

I have 13 links waiting for approval but they do not show up in approve links to be able to delete or approve.

Im still using the first version. I havn't been here for a while now.

Any idea how I get them to show or remove them from the approve/delete with out ruining the rest of my links.
Title: Re: SMF Links
Post by: smalldonkey on October 02, 2007, 04:53:14 pm
I am not sure if this has been covered.  I can't find it??

I am trying to change the category header titles that show when running the links mod.  Two questions:

1.  How would you change the size of the type and the font they appear in?  or

2.  How do you make them just not appear??
Title: Re: SMF Links
Post by: smalldonkey on October 02, 2007, 07:55:05 pm
 ???
Title: Re: SMF Links
Post by: SMFHacks on October 02, 2007, 08:13:43 pm
1. That is controlled by style.css

2. If the links do not appear maybe cause if a member deleted their account.
Title: Re: SMF Links
Post by: GameSocket on October 02, 2007, 11:59:13 pm
I take it no reply means there is no idea why I can not see the links to approve or delete?
Title: Re: SMF Links
Post by: smalldonkey on October 03, 2007, 04:14:36 pm
I have the Dilbert theme and I have played around with it a fair bit.  I cannot figure out what changes the font and size of the header title when you click on a category to post a link.
Help?

I can delete the main title (links) but i don't know how to delete the sub categories.  With that said, I am not even sure I want the title headers completely gone anyway...

Help??
Title: Re: SMF Links
Post by: smalldonkey on October 04, 2007, 12:21:42 pm
any idea where to make these changes?
Title: Re: SMF Links
Post by: SMFHacks on October 04, 2007, 07:19:57 pm
All the font sizes,colors are controlled by the style.css and the classes used in the template
Title: Re: SMF Links
Post by: GameSocket on October 05, 2007, 11:14:23 pm
Can you please answer me. If the answer is p off, just let me know. I now have 45 unapproved links.

I have uploaded
Links.template.php from the new version to the themes/defaulf folder
Copy Links.english.php to themes/default/languages/
Copy Links.php to the Sources folder.

The linksql.php gives me errors a working copy of that might help to at least upgrade..

And a little help with not viewing those waiting.
(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv253%2FPolymath%2Fapprove1.jpg&hash=ecb2ee0362543d16ffda717f9d623f68ade0de84)

(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv253%2FPolymath%2Fapprove2.jpg&hash=e73788e954d4d8c4145a7249e2a783671ab68a2b)

Title: Re: SMF Links
Post by: atmos on October 12, 2007, 06:28:43 am
Hello, I've a problem with this mod:

I've installed it but i can't se nothing

When I've disinstalled tha mod i've seen this  errors:


./index.php Fallito (failed in italian)
./Themes/default/index.template.php Fallito
./Sources/ManagePermissions.php Fallito
./Sources/Subs.php Fallito


Maybe when I install link mod this file are not modified, Why?

Maybe a problem with the ftp permission?

Thank you in advance...
Title: Re: SMF Links
Post by: SMFHacks on October 12, 2007, 07:14:54 am
Are you using a custom theme? If so try the default.
Also You will need to copy the text in themes/default/languages/modifications.english.php to themes/default/languages/modifications.yourforumlanguage.php
Title: Re: SMF Links
Post by: samyot on October 17, 2007, 09:03:31 am
Can you please answer me. If the answer is p off, just let me know. I now have 45 unapproved links.

I have uploaded
Links.template.php from the new version to the themes/defaulf folder
Copy Links.english.php to themes/default/languages/
Copy Links.php to the Sources folder.

The linksql.php gives me errors a working copy of that might help to at least upgrade..

And a little help with not viewing those waiting.
(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv253%2FPolymath%2Fapprove1.jpg&hash=ecb2ee0362543d16ffda717f9d623f68ade0de84)

(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv253%2FPolymath%2Fapprove2.jpg&hash=e73788e954d4d8c4145a7249e2a783671ab68a2b)



Hi,

I have the same problem but I know what it is...SPAMMERS!

Even though I set permissions for guests to only view, I get dozens of new submissions daily with an ID_CAT of 0, which doesn't exist. That is why the approve page doesn't show them... If I change the ID_CAT to an existing id, them I see them. The ID_MEMBER is also 0, so they are bypassing the links permissions somehow.
(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fwww.mytechsupport.ca%2Fsmf_links.png&hash=44db5a97200b155e7812c8fe178c9a95d55e48cf)
I have tried to add captcha to the links submition page with no success. Does anybody know how this could be implemented or know of a way to stop spammers?
Title: Re: SMF Links
Post by: samyot on October 17, 2007, 09:14:07 am
OK, I've removed the permissions through the Links Configuration and changed the permissions through the Member Permissions instead and set the Guest group to only view.

I'll see within the next few days if they can still spam my links directory.....
Title: Re: SMF Links
Post by: GameSocket on October 17, 2007, 06:38:19 pm
If this works your a champion. I'm in my database admin. What am I changing and how. I think all I have just done is add more tables. I changed the ID_CAT......0 to 3 and clicked GO but nothing happend..is that right?
Title: Re: SMF Links
Post by: GameSocket on October 18, 2007, 04:31:43 am
Ok.. I cleared my forum error reports and then tried to accept or decline...this is the error I got
8: Undefined index: smflinks_set_count_child
File: /home/ezmne3/public_html/gamesocket2/Themes/default/languages/Admin.english.php (eval?)
Line: 1358
Title: Re: SMF Links
Post by: samyot on October 18, 2007, 11:12:19 am
If this works your a champion. I'm in my database admin. What am I changing and how. I think all I have just done is add more tables. I changed the ID_CAT......0 to 3 and clicked GO but nothing happend..is that right?
Hi,

I just verified your site and you don't appear to have a cat with ID3, try changing all ID_CAT that = 0 to 1 (since you have one, Game Sites)
Title: Re: SMF Links
Post by: GameSocket on October 18, 2007, 04:26:26 pm
ahhh. Thanks samyot.  ;D Finally can clear them. Its always been a long process to clear waiting links but now I have 146 to do over time.

I always had spammers/bots putting in links but they have always shown up. Something has changed somewhere.

I am working on getting an existing links software to install into SMF that has its own settings, capture, admin and support forum. I just have to read up tutorials and send a lot more emails to the makers(done that and responded). Probably nearer the end of the year

Thankyou so much for your reply.
Title: Re: SMF Links
Post by: samyot on October 19, 2007, 01:33:07 pm
No prob! ;D

I just wanted to let you know that I haven't had any spam entries since changing the permissions through the Member Permissions instead of the Links MOD and setting the Guest group to only view!
Title: Re: SMF Links
Post by: GameSocket on October 19, 2007, 11:58:39 pm
Cheers. Yeah I got mine on Guest post. Might change it and just use contact for genuine links.

Thanks
Title: Re: SMF Links
Post by: sasawawa on October 28, 2007, 12:59:09 pm
Thanks,installed successfully.

But i have one question, how can i add a new tag that named "links" on my homepage.

I just add
Code: [Select]
if ($context['current_action'] == 'links')
$current_action = 'links';
after
Code: [Select]
if ($context['current_action'] == 'search2')
$current_action = 'search';
in my forum index.template.php i using default theme.

But i still can't see there is a tag "links' display on my homepage.  ???


Help need ,please.

Any help will be appreciated
Title: Re: SMF Links
Post by: GameSocket on October 28, 2007, 06:13:46 pm
Code: [Select]

// How about the [links] button?
echo '
<a href="', $scripturl, '?action=links">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/links.gif" alt="' . $txt['links'] . '" border="0" />' : $txt['links']), '</a>', $context['menu_separator'];

// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];
 
 

You will see where it goes
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 03:51:28 am
I have added the links tag on my homepage, but only admins can see the links tag. ???

Members and guests can't see it.

Moreover, when the members group visit the URL "forum/index.php?action=links"

There is a note : An Error Has Occurred!


Below is the code in my index.template.php :

Code: [Select]
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;




// Work out where we currently are.
$current_action = 'home';
if (in_array($context['current_action'], array('admin', 'managegames', 'arcadesettings', 'arcadecategory', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
$current_action = 'admin';
if (in_array($context['current_action'], array('links','search', 'arcade', 'admin', 'calendar', 'profile', 'mlist','register', 'login', 'help', 'pm')))
$current_action = $context['current_action'];
if ($context['current_action'] == 'search2')
$current_action = 'search';
if ($context['current_action'] == 'links')
$current_action = 'links';
if ($context['current_action'] == 'theme')
$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';




// Are we using right-to-left orientation?
if ($context['right_to_left'])
{
$first = 'last';
$last = 'first';
}
else
{
$first = 'first';
$last = 'last';
}




// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="maintab_' , $first , '">&nbsp;</td>';




// Show the [home] button.
echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';





echo ($current_action == 'arcade' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'arcade' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=arcade">' , $txt['arcade'] , '</a>
</td>' , $current_action == 'arcade' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';





// How about the [search] button?
if ($context['allow_search'])
echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
</td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
// the [links] button
if ($context['allow_view_smflinks'])
echo ($current_action == 'links' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'links' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=links">' ,links , '</a>
</td>' , $current_action == 'links' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
</td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
</td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




// the [member] list button
if ($context['allow_memberlist'])
echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
</td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';












// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
</td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';








// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=join">' , $txt[97] , '</a>
</td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';








// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
</td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';




// The end of tab section.
echo '
<td class="maintab_' , $last , '">&nbsp;</td>
</tr>
</table>';




}




I do  appreciate for your help  ???
Title: Re: SMF Links
Post by: GameSocket on October 29, 2007, 04:39:50 am
Have you gone to admin links settings and set it for guests and members?

Admin>>Board permissions>>>guests modify>>SMF Links>>>tick or untick your preferences.

Do the same thing for members.
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 06:10:05 am
Have you gone to admin links settings and set it for guests and members?

Admin>>Board permissions>>>guests modify>>SMF Links>>>tick or untick your preferences.

Do the same thing for members.


Thanks for your reply,GameSocket.

 But there is no the option of SMF under my Admin>>Board permissions>>>guests modify  >:(

Btw, i have enabled guests and all members' permission of "View,add link, edit own link, delete own link " .
 ???

Still doesn't work.
   


Title: Re: SMF Links
Post by: GameSocket on October 29, 2007, 06:22:41 am
where is your site? I done use the default theme and I don't like links that much.

If you have given them those permissions the should be seeing the link and access.
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 11:47:23 am
My forum link is here :


http://www.invest-tracing.com/forum/index.php

May i ask you a favor ?

Could you check my code fix me the problem ?

 >:(

I am stupid with the codes .
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 12:34:50 pm
Then the mod isn't installed.
Links are not handled in the admin panel. You need to go to the links page http://yoursite.com/index.php?act=links  from there you can add categories and manage links.
Only thing in the admin panel you will find is permissions under the permissions page.

SMFHacks.com


Dear Admin,

i don't see there is links  permissions under my forum Admin CP- Members--Permissions  ???
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 01:33:19 pm
Damn, i missed admin's reply  on the 3rd page of this thread.

All is fine now.

Thanks, smfhacks.com  :)
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 02:17:10 pm
How to change the codes  then click links will open in a new window ?

Thanks
 :-*
Title: Re: SMF Links
Post by: GameSocket on October 29, 2007, 04:20:59 pm
I just visited your site and could view and click your links.  I don't know whats the matter.
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 04:31:58 pm
I just visited your site and could view and click your links.  I don't know whats the matter.

Yeah, the links mod works smoothly, what i said above is :

Now when we click the link it will open in the same window, how can i set them open in a new window.

Sorry for my bad English.

Hope i cleared myself to you. :)
Title: Re: SMF Links
Post by: GameSocket on October 29, 2007, 04:44:55 pm
I don't know mate. They open in another window for me.
Title: Re: SMF Links
Post by: sasawawa on October 29, 2007, 05:21:33 pm
I don't know mate. They open in another window for me.

Sorry, my fault

All if fine now. ;D

Thanks anyway.
Title: SMF Links - only so may characters allowed in description?
Post by: catchpen on October 31, 2007, 03:47:46 am
I'm adding a small.gif  plus 1 or 2 sentences in the description field.  It all fits until I hit save and I go back and it's not there.  Is there a change I can make somewhere?

see here: http://www.topsupplementshops.com/index.php?action=links;cat=1 (http://www.topsupplementshops.com/index.php?action=links;cat=1)

Thanks ahead.
Title: Re: SMF Links
Post by: GameSocket on October 31, 2007, 01:52:49 pm
I'm not sure what you are after. I took a look and they seem ok to me. I guess you want them above the text. Try a space or two either way >< its probably trying to fit into the table size.  ???

By the way it looks good.
Title: Re: SMF Links
Post by: catchpen on October 31, 2007, 04:40:58 pm
Thanks, or thank the Mod Author  ;D I can't wait for the next version.  Anyways ....look at the entry My Supplement Store "for free shipping any o" No I'm not running a prostitution ring,  :D  that's supposed to be "order" but I run out of characters. Further back on this topic someone mentioned only 255 characters for this section, I guess that counts the html code for the pic? I was wondering if I could change this somewhere on the links template.

Thanks,
C.P.
Title: Re: SMF Links - only so may characters allowed in description?
Post by: catchpen on November 04, 2007, 02:24:34 pm
I'm adding a small.gif  plus 1 or 2 sentences in the description field.  It all fits until I hit save and I go back and it's not there.  Is there a change I can make somewhere?

see here: http://www.topsupplementshops.com/index.php?action=links;cat=1 (http://www.topsupplementshops.com/index.php?action=links;cat=1)

Thanks ahead.

Hello? Tap tap tap. Is this thing on?
Title: Re: SMF Links
Post by: GameSocket on November 07, 2007, 02:45:22 pm
I don't expect an answer or support, but here goes

I have an error in my log.Heaps of them.

: Undefined index: smflinks_set_count_child
File: /****/****/public_html/*****/Themes/default/languages/Admin.english.php (eval?)
Line: 1358

Think ya know how I fix it?
Title: Re: SMF Links - only so may characters allowed in description?
Post by: catchpen on November 09, 2007, 12:07:48 pm
I'm adding a small.gif  plus 1 or 2 sentences in the description field.  It all fits until I hit save and I go back and it's not there.  Is there a change I can make somewhere?

see here: http://www.topsupplementshops.com/index.php?action=links;cat=1 (http://www.topsupplementshops.com/index.php?action=links;cat=1)

Thanks ahead.
....look at the entry My Supplement Store "for free shipping any o" No I'm not running a prostitution ring, that's supposed to be "order" but I run out of characters. Further back on this topic someone mentioned only 255 characters for this section, I guess that counts the html code for the pic? I was wondering if I could change this somewhere on the links template.

Thanks,
C.P.

Where do we get support for this mod?
Title: Re: SMF Links
Post by: GameSocket on November 09, 2007, 04:03:34 pm
 
 
 
Quote

Where do we get support for this mod?

Not here
Title: Re: SMF Links
Post by: stormlrd on November 09, 2007, 04:47:27 pm
need to increase the field in the database apparently its not large enough to handle long information
Title: Re: SMF Links
Post by: GameSocket on November 09, 2007, 04:58:56 pm
How does he do that stormlrd. From phpmyadmin? At the host account?

Thanks for a reply.
Title: Re: SMF Links
Post by: stormlrd on November 09, 2007, 05:29:05 pm
phpadmin but i dont remember which field it is, have to research that.
Title: Re: SMF Links
Post by: catchpen on November 09, 2007, 10:39:47 pm
phpadmin but i dont remember which field it is, have to research that.

Thanks guys -
Well that's what I needed a point in the right direction. I changed the description field from VARCHAR type to TEXT which text has an 8000 character limit but the one bad thing is supposedly it takes a performance hit. I changed it and so far so good? I figured what the hell I could still get to phpMyAdmin if I hose up my forum.


See pic.

(https://www.smfhacks.com/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv314%2Ffallome%2Fvarchar-change-to-text.gif&hash=2cfb2a19698a7bd9f4ce702b04c5ca4ecc7b8c45)
Title: Re: SMF Links
Post by: GameSocket on November 09, 2007, 10:48:52 pm
* clap* *clap* catchpen
Title: Re: SMF Links
Post by: klabautermann on December 05, 2007, 09:18:19 am
One or two silly questions. I have it running, no problems. But in the config for what stands "Pagerank" and "Alexa information"? Both are enabled, and "Show Alexa
Show Pagerank" also, but I cant see them. where does i find them?
Title: Re: SMF Links
Post by: SMFHacks on December 05, 2007, 07:11:23 pm
Pagerank and alexa are not currently supported/working
Title: Re: SMF Links
Post by: klabautermann on December 06, 2007, 01:37:12 am
ahhh okay, will it be supported in the future?
Title: Re: SMF Links
Post by: Qayyom on December 15, 2007, 12:50:55 am
Is it possible......??

I want to escape category section/ list.

I want all Listed websites links shows at root/main page of "Links"

Like a singe page
Title: Re: SMF Links
Post by: SMFHacks on December 15, 2007, 08:59:17 am
Not yet
Add the suggestion to the
http://www.smfhacks.com/index.php?action=modtracker
Title: Re: SMF Links
Post by: Flintridge on December 16, 2007, 08:38:09 am
I have installed this MOD, it looked so good and will do what i need, But i have an issue.

I am using SMF 1.1.4 and i installed it.  I did install it while in the default theme, because you never know if a template will work or not or at least i never do.

What i get is in the Admin area under Configurations is a space inbetween server settings and current think.  I am assuming this space is suppose to be for links since it was not there before. What i do get is a way after it is installed to get to links anymore after that.  At shows under packages there and installed with no errors. 

   What i should add is right after it is installed you are in the links area to add links and all that, so it works.  What the issue is after you leave that area the first time, this is no way to get back to it via forums or in the admin section.

   If there is already a solution i missed for this or a item i need to check that i did not know.  Please let me know, i really want to use this mod.  I had saw under the mods comment i was not the only person having the same issue with SMF 1.1.4 with this mod.

Thank you!
Title: Re: SMF Links
Post by: SMFHacks on December 16, 2007, 08:43:35 am
Check your language under Sever Settings it should be english not english utf8 if you are not using english as the main language copy themes/default/languages/modifications.english.php to themes/default/languages/modifications.yourlanguage.php
Title: Re: SMF Links
Post by: Flintridge on December 16, 2007, 08:53:52 am
First thank you for the very fast reply.

I went there and checked it, it has a drop down but my only choice is English. It had no other options. 

Here is the link to my site  www.newbieworldorder.com  I have it in default template while i work on this.

I use Tiny Portal.

I also noticed when i went to permissions, then group permissions there is a blank area with boxes to click but no words between personal messaging and Member Profiles. 

does that give you any clues of what i could try next?
Title: Re: SMF Links
Post by: Flintridge on December 16, 2007, 09:22:55 am
Open up Modifications.english.php

Add these before ?>

Code: [Select]
//Begin SMF Links Text Strings
$txt['smflinks_menu'] = 'Links';
$txt['permissiongroup_smflinks'] = 'SMF Links';
$txt['permissionname_view_smflinks'] = 'View Links Page';
$txt['permissionhelp_view_smflinks'] = 'Sets if the user can view the links page.';
$txt['cannot_view_smflinks'] = 'You can not view the links page.';
$txt['permissionname_add_links'] = 'Add Links';
$txt['permissionhelp_add_links'] = 'If the user is allowed to submit links';
$txt['cannot_add_links'] = 'You can not add links.';
$txt['permissionname_edit_links'] = 'Edit Links';
$txt['permissionhelp_edit_links'] = 'If the user is allowed to edit links';
$txt['cannot_edit_links'] = 'You can not edit links.';
$txt['permissionname_delete_links'] = 'Delete Links';
$txt['permissionhelp_delete_links'] = 'If the user is allowed to delete links';
$txt['cannot_delete_links'] = 'You can not delete links.';
$txt['permissionname_approve_links'] = 'Approve Links';
$txt['permissionhelp_approve_links'] = 'If the user is allowed to approve links';
$txt['cannot_approve_links'] = 'You can not approve links.';
$txt['permissionname_links_auto_approve'] = 'Links Auto Approved';
$txt['permissionhelp_links_auto_approve'] = 'If the users links are auto approved when submitted.';
$txt['permissionname_rate_links'] = 'Rate Links';
$txt['permissionhelp_rate_links'] = 'If the user is allowed to rate links';
$txt['cannot_rate_links'] = 'You are not allowed to rate links.';
$txt['permissionname_links_manage_cat'] = 'Manage Categories';
$txt['permissionhelp_links_manage_cat'] = 'User can add/remove/edit/reorder categories';
$txt['cannot_links_manage_cat'] = 'You are not allowed to manage categories.';
//END SMF Links Strings


I would like to add that you had a fix for it on the 3 page of this topic.  This completely worked for me..


Thank you,
Title: Re: SMF Links
Post by: Flintridge on December 16, 2007, 09:24:56 am
I would like to add that i still get that space though

Quote
What i get is in the Admin area under Configurations is a space inbetween server settings and current think.

Not sure what that is about but was never there before the mod.

Thank you.

PS does not seem to hurt anything  :)
Title: Re: SMF Links
Post by: Flintridge on December 16, 2007, 09:32:27 am
OK,

So now i have a new issue.  ^^   I changed back to my template i like to use Helios Multi and the link item in the menu bar disappeared, but when i go back to default it comes back.  I looked under languages for Helios but did not see the modification.english.php to add to it. 

Could you help me with what code on what file i need to edit to get it to work with any template that is not default?

Thank you,


I like to add i tried 5 different themes and all had the same issue.  So i can only assume its some file i need to add some code to right?
Title: Re: SMF Links
Post by: Flintridge on December 16, 2007, 10:07:51 am
1. Depends if you are using a custom theme you will need to add a link or button.

2. Nothing is in the admin panel you manage all links from the links page.

3. Same as #1

This is probably a dumb question, but i am a noob at this.  How do i add a button to a theme? 

Update,

Went to the Indext.template.php

added the following code.

Quote
   // Show all the relative links, such as help, search, contents, and the like.
   echo '
   <link rel="help" href="', $scripturl, '?action=help" target="_blank" />
   <link rel="search" href="' . $scripturl . '?action=search" />
   <link rel="links" href="' . $scripturl . '?action=links" />
   <link rel="contents" href="', $scripturl, '" />';

<link rel="links" href="' . $scripturl . '?action=links" />

and Under this

Quote
// Show the menu up top.  Something like [home] [help] [profile] [logout]...
function template_menu()
{
        global $context, $settings, $options, $scripturl, $txt;

I added this

Quote
// How about the [links] button?
          echo '<td><a href="', $scripturl, '?action=links">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/links.gif" alt="' . $txt['120'] . '" style="margin: 0px 0;" border="0" />' : $txt[120]), '</a></td>';

I put mine between my search button and arcade button in that list there.

I also created via paint a button from modifiy one of the buttons from the template to say links and uploaded it to:

Themes/heliosmulticolorTP/images/english/links.gif

All is well now except my poorly made button for that template :(

I hope that helps someone else, was kind of inconvenient to find but its one nice mod!!  :)

Thank you,

Title: Re: SMF Links
Post by: klabautermann on January 05, 2008, 01:15:47 pm
I have one little Problem. I have made one Categorie, under this are 20 links. So now I have also made some subcategories under the parrent Cat., and put in the SubCat. also 20 links, but on the frontpage (where the parrent cat stands) the links want be count totally. Normally there have to be 40 Links counted, but there are only the Parrent Links counted. Any hints?
Title: Re: SMF Links
Post by: SMFHacks on January 05, 2008, 03:35:39 pm
Not sure if I added subcounting of links totals for the links mod. Check under settings and see if there is an option for that.
Title: Re: SMF Links
Post by: klabautermann on January 05, 2008, 04:17:13 pm
Ah so easy ;)

Option is called: Counts child categories link totals.
(Uses more queries)
Title: Re: SMF Links
Post by: klabautermann on January 07, 2008, 07:33:28 am
Is it possible to sort the links automatically alphabetical descending by name? And is it possible to get the kins searchable?
Title: Re: SMF Links
Post by: SMFHacks on January 07, 2008, 08:07:29 pm
It is possible add it to the mod tracker and when I get some free time would work on those suggestions
Title: Re: SMF Links
Post by: klabautermann on January 08, 2008, 12:08:22 am
Mod tracker?
Title: Re: SMF Links
Post by: SMFHacks on January 08, 2008, 07:26:17 am
http://www.smfhacks.com/index.php?action=modtracker
Title: Re: SMF Links
Post by: myaicons on January 10, 2008, 10:04:05 pm
I have a problem.
I instaled the SMF links... and all went well.. created my categories and sub categories... set my permissions so even guests can view the links page (but not create edit or delete of course) but then i logged out to check what it looks like from a guest view... and it asks me to register in order to view the links page!  argh! what did i do wrong??!! it should show up to everybody... please help?!

thanks a bunch for a prompt reply
Title: Re: SMF Links
Post by: SMFHacks on January 10, 2008, 10:38:20 pm
As long as each group has the view links permissions then it should be ok double check under permissions for guests.
Title: Re: SMF Links
Post by: myaicons on January 10, 2008, 10:43:58 pm
yup... i have all of them set to be able to VIEW... yet no luck... then i tried setting everyone... even guests to have full permission... and it still wont let me see the main links page from a guest stand point... also i noticed my category permission list does not show all of the permissions i set (which i absolutely know i set them)...

this is what i get

"You can not view the links page.
Please login below or register an account with Message Board"


 :( help !!!!!!!!!!!!!!!!!!

Title: Members cant view links!
Post by: jozeta on January 12, 2008, 06:15:56 am
installed the linksystem today. no problem there. set up all permissions for the guest, members, mod and admin.
when im logged in as admin it all works greate, but when i loggin as a member i dont have permission to view the links,
i dont even have the link in the menubar? whats wrong?
Title: Re: Members cant view links!
Post by: myaicons on January 13, 2008, 01:20:32 pm
installed the linksystem today. no problem there. set up all permissions for the guest, members, mod and admin.
when im logged in as admin it all works greate, but when i loggin as a member i dont have permission to view the links,


this seems to be a common problem... as iv read from the smf support site of others who have encountered not being able to view the links page...

fix?
Title: Re: SMF Links
Post by: jozeta on January 14, 2008, 06:04:43 pm
fixed it...

didnt know that u hade to add permissions for users in smf to, so heads up!
you have to add permissions in both smf links and userrights in smf
Title: Re: SMF Links
Post by: Phillip on January 18, 2008, 07:17:05 pm
How do I get the links tab to show in the toolbar on SMF 1.1.4
Title: Re: SMF Links
Post by: SMFHacks on January 18, 2008, 08:20:23 pm
For custom themes you will need to modify the index.template.php of that custom theme
Title: Re: SMF Links
Post by: klabautermann on January 19, 2008, 06:01:38 am
@SMFHacks: Could you tell me how long it will normaly last till a mod request is worked up?

And is it possible to get one link more than one times? I have some links that fit in multiple categories.
Title: Re: SMF Links
Post by: SMFHacks on January 19, 2008, 10:40:40 am
A long time normally a couple months for the normal mods.
Title: Re: SMF Links
Post by: klabautermann on January 19, 2008, 12:22:54 pm
Thanks for answering so fast SMFHACKS. And could you please answer this questions also:

And is it possible to get one link more than one times? I have some links that fit in multiple categories.
Title: Re: SMF Links
Post by: johnathanamber on February 06, 2008, 10:13:41 am
OK, I have an issue with SMF Links. BTW, this is a great mod. I've used ti a lot.

Anyway, I am using SMF 1.1.4. For the most part it works great, except I get the following in the error log that I would like to get corrected:

Quote
2: file_get_contents(): URL file-access is disabled in the server configuration
File: /home/content/t/s/g/tsgcomputers/html/forum/Sources/alexa.php
Line: 8

2: file_get_contents(http://data.alexa.com/data?cli=10&dat=snbamz&url=http://www.ruachfellowship.org/phpBB2/index.php): failed to open stream: no suitable wrapper could be found
File: /home/content/t/s/g/tsgcomputers/html/forum/Sources/alexa.php
Line: 8

I get these errors twice each time I post a new link... any ideas?

Thank you very much and God bless,
Johnathan
Title: Re: SMF Links
Post by: johnathanamber on February 06, 2008, 10:19:41 am
BTW, Just to make it easier, here are lines 7,8 and 9 of the alexa.php file:

Code: [Select]
$aadress = 'http://data.alexa.com/data?cli=10&dat=snbamz&url='.$url;
preg_match ( '@" TEXT=" ( ( d|, ) +? ) "@i', file_get_contents ( $aadress ) , $ainfo ) ;
if ( empty ( $ainfo [ 1 ] ) )
Title: Re: SMF Links
Post by: SMFHacks on February 06, 2008, 10:25:46 am
Alexa and page rank functions currently do not work with the links mod.
Title: Re: SMF Links
Post by: johnathanamber on February 06, 2008, 10:45:55 am
So then is my only option is to remove the MOD?
Title: Re: SMF Links
Post by: SMFHacks on February 06, 2008, 11:09:04 am
You can disable the alexa and pagerank options under the settings
Title: Re: SMF Links
Post by: johnathanamber on February 06, 2008, 11:22:11 am
OK, thanks for that. I have disabled both Alexa and PageRanks. Guess we'll see what happens.

Thanks again and God bless,
Johnathan
Title: Re: SMF Links
Post by: klabautermann on February 26, 2008, 02:30:18 am
One little question. What is the best way to do a update from 1.6.5 to 1.6.7? Do I have to uninstall the gallery first? are do i extract the package and do a file transfer?
Title: Re: SMF Links
Post by: SMFHacks on February 26, 2008, 07:11:48 am
For the links you would  need to uninstall the old version first.
Title: Re: SMF Links
Post by: klabautermann on February 26, 2008, 07:18:33 am
For the links you would  need to uninstall the old version first.

When I uninstall the mod, what happens with the links that are allready put in the mod? Till yet i have over 160 links posted there.
Title: Re: SMF Links
Post by: SMFHacks on February 26, 2008, 07:37:44 pm
The links stay inside the database.
Title: Re: SMF Links
Post by: Paddleducks Forum - Damien on March 22, 2008, 01:44:35 pm
I've been using SMF Links v1.6.6 for some time, and it always worked perfectly....

I've changed to a new host, and eveything works except for SMF Links - When I click on an entry to visit a website, or click on Edit or Delete - It generates a #406 "Not Ecceptable" error in my browser (Internet Explorer).

Even deleting the database and recreating with a fresh install doesn't work - So it's not a corrupted database.

Does anyone have any ideas what might be wrong? Could it be one of my hosts settings causing it, if so what?

I'm at a total loss as to where to look next.....

Eddy
Title: Re: SMF Links
Post by: SMFHacks on March 22, 2008, 02:29:58 pm
Looks like a permission or mod_security issue
http://www.simplemachines.org/community/index.php?topic=34270.0
Title: Re: SMF Links
Post by: Paddleducks Forum - Damien on March 24, 2008, 04:38:20 am
Looks like a permission or mod_security issue
http://www.simplemachines.org/community/index.php?topic=34270.0

After further tests, it is definately a mod_security issue - However, my host won't turn off this feature, and won't allow htacces files to turn it off either.

Is there any way SMF Links can be modified so that it doesn't conflict with mod_security ??

I don't have this problem with any of the other software I use, SMF, Coppermine, MKPortal etc etc. So I can only assume that there is a problem with SMF Links that needs to be addressed, particularly as more and more hosts are turning on mod_security.

Regards
Eddy
Title: Re: SMF Links
Post by: v890115 on June 01, 2008, 06:44:55 pm
Hello everyone.

I just installed the SMF Links mod onto my site. I don't see the Link on the menu anywhere. Am I supposed to manually add link code to the index.template.php somewhere? If that's the case, what code how to create a link to it?

I want everyone to see the Links created by users.
Title: Re: SMF Links
Post by: mashby on June 01, 2008, 07:51:21 pm
Yes, I'm assuming you are using a theme other than CORE. You'll have to edit the index.template.php file for your theme.
Title: Re: SMF Links
Post by: lonewood on June 13, 2008, 05:59:56 pm
I have a new install of SMF (just a few weeks old) with mods SMF Links, Gallery and Tiny Portal installed.

I have just had one of my members say that they cannot view any of the links when using Firefox - with IE they work ok.  Dont have Firefox so cant test this myself.  Would this be likely?

The site is at www.connectingcelts.com.au

Also had a problem with adding links by members - a permission problem but I think I have this worked out after reading through all of this thread - didnt realise I had to set it in admin as well as the links part. 

Any ideas on the Firefox issue?

cheers
Leah
Title: Re: SMF Links gives SEO links ?
Post by: Hier on June 25, 2008, 05:49:24 am
Hello. I had tried SMF links may be a year ago. I wanted to know whether SMF Links gives direct hard links (like http://www.somesite.com) or redirected links (like http://www.mysite.com/someinternalid ). The reason I am asking is that some of my link partners use automated reciprocal link checking system, and internal links redirected to the partner site are not valid. Hope I am clear. Thanks !
Title: Re: SMF Links
Post by: SMFHacks on June 25, 2008, 07:42:17 am
It uses redirected links to track clicks.
Title: Re: SMF Links
Post by: Hier on June 25, 2008, 08:20:56 am
It uses redirected links to track clicks.
Thanks for reply. If I do not want to track outgoing clicks, is there a way to modify some code so that the links appear as hard links and not as redirected ? I need this badly. Thanks
Title: Re: SMF Links
Post by: v890115 on June 25, 2008, 09:23:56 am
Hi everyone,

Can someone verify if this is correct?


            // the [SMF Links] button
            if ($context['allow_view_smflinks'])
                echo'<li><a href="http://www.siraint.com/index.php?action=links">' , $txt['smflinks_menu'] , '</a></li>';

I added the above to my index.template.php but still wouldn't show up on the menu bar

Any suggestions?

Thanks in advance!
Title: Re: SMF Links
Post by: Hier on June 25, 2008, 10:12:38 am
Hi everyone,

Can someone verify if this is correct?


            // the [SMF Links] button
            if ($context['allow_view_smflinks'])
                echo'<li><a href="http://www.siraint.com/index.php?action=links">' , $txt['smflinks_menu'] , '</a></li>';

I added the above to my index.template.php but still wouldn't show up on the menu bar

Any suggestions?

Thanks in advance!
Find
Code: [Select]
if (in_array($context['current_action'], array('search' Add'links' there anywhere in the line maintaining the proper format. Change
Code: [Select]
' , $txt['smflinks_menu'] , ' to 'Links' or whatever text you want. Hope the rest of the code you mentioned follows the pattern of your theme; each theme will have different.
Title: Re: SMF Links
Post by: v890115 on June 25, 2008, 10:18:31 am
Here is an example on the index file for the theme I am using:

            // the [member] list button
            if ($context['allow_memberlist'])
               echo '<li><a ' , $current_action=='mlist' ? ' class="current"' : '' , ' href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';

And I added the below:

            // the [SMF Links] button
            if ($context['allow_view_smflinks'])
                echo'<li><a href="http://www.siraint.com/index.php?action=links">' , $txt['smflinks_menu'] , '</a></li>';

Not very PHP savvy here so if you could help, I'd really appreciate your time!
Title: Re: SMF Links
Post by: Hier on June 25, 2008, 10:58:17 am
I am not using the links mod, so am not sure if it has permissions. But if you want even your guests to view the link button, change that code to
Code: [Select]
// the [SMF Links] list button
            echo '<li><a ' , $current_action=='links' ? ' class="current"' : '' , ' href="', $scripturl, '?action=links"><span>Links</span></a></li>';
. As my previous post, also add 'links' to the array. After
Code: [Select]
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', add
Code: [Select]
'links',
Title: Re: SMF Links
Post by: v890115 on June 25, 2008, 12:12:31 pm
Hier,

Thank you! that works. I appreciate you helping me on this!!!
Title: Re: SMF Links
Post by: Hier on June 26, 2008, 03:26:49 am
It uses redirected links to track clicks.
I've made a small modification which I am posting; it may help someone like me.

Pros : It will change links display in frontend from redirected links (like http://mysite/index.php?action=links;sa=visit;id=1) to direct links (like http://somesite.com). If you want to submit your site to directories or sites that do automatic reciprocal link check, this will be helpful.

Cons : Outgoing clicks will not be tracked.

Modification : Open /Themes/default/Links.template.php. Find
Code: [Select]
$dbresult = db_query("SELECT l.ID_LINK,l.title,l.date, l.pagerank, l.alexa, l.rating, m.realName, l.ID_MEMBER, l.description,l.hitsChange that to
Code: [Select]
$dbresult = db_query("SELECT l.ID_LINK,l.title,l.date, l.pagerank, l.alexa, l.rating, m.realName, l.ID_MEMBER, l.description,l.hits,l.urlI've only added ",l.url" (without quotes) at the end. Next find
Code: [Select]
echo '<td class="windowbg2" valign="top"><a href="' . $scripturl . '?action=links;sa=visit;id=' . $row['ID_LINK'] . '" target="blank">' . $row['title'] . '</a></td>'; Change that to
Code: [Select]
echo '<td class="windowbg2" valign="top"><a href="' . $row['url'] . '" target="blank">' . $row['title'] . '</a></td>'; And you're done.
Title: Re: SMF Links
Post by: warhonowicz on August 19, 2008, 02:03:35 pm
would it be possible to add an image to each link? and have it displayed next to the name (above?)?
Title: Re: SMF Links
Post by: callum on August 31, 2008, 01:38:40 am
What do i do with the rest of the files included in the zip file?

I am using the instructions found here:
http://custom.simplemachines.org/mods/index.php?action=parse;mod=381;attach=48691;smf_version=1.1.5

It does not say what to do with the rest of the files, these being:
links.gif
linksql.php
redirect.txt
links109.xml
links.xml
package-info.xml


Please help!! :'( :'( :'(
Title: Re: SMF Links
Post by: SMFHacks on August 31, 2008, 07:57:15 am
Any reason why you are not using the package manager?
Title: Re: SMF Links
Post by: callum on August 31, 2008, 08:02:13 am
Ummm I was supposed to use that?

The instructions on the website said nothing about the package manager....

Am I missing something?
Title: Re: SMF Links
Post by: SMFHacks on August 31, 2008, 08:09:22 am
That is how all mod's are installed using SMF unless it is a very custom theme.
Use the package manager and upload the modification and it will auto install it for you.
Title: Re: SMF Links
Post by: callum on August 31, 2008, 08:51:25 am
Thanks mate, you just saved me a whole lot of time :)

I wish it had been more obvious that that is the correct way to install mods.
Title: Re: SMF Links
Post by: Sweetwater on October 02, 2008, 10:03:56 am
Would be good if links could be manually sorted within a category, OR if the highest rated was on top maybe.

Great mod. Works fine.

Sweetwater
Title: Re: SMF Links
Post by: HarshReality on November 19, 2008, 10:00:14 pm
OK, using 1.7.1 in 1.1.7 SMF. Installed using package manager and validated all additions/edits. STILL get:
yadda yadda/index.php?action=links;sa=visit;id=71
Unable to load the 'main' template.

Now.. Ive validated the template file & its location.. Ive even put it in the custom theme folder and the error persists... Incidentally, it only happens when a link is clicked.
Title: Re: SMF Links
Post by: HarshReality on November 21, 2008, 10:07:54 am
Come on guys, surely we have some idea here? This AM was 3 pages of that error from different links clicked and viewed.
Title: Re: SMF Links
Post by: Paddleducks Forum - Damien on February 01, 2009, 02:02:34 am
I've installed SMF Links 1.7.2 and it's mistly working fine, except for one annoying thing...

When a user enters a new link, it says "An error occurred", Your link needs to be approved before it's visible...

Yes the link needs to be approved, but it's NOT an error surely?

This is confusing a LOT of my users as they think there is a problem.... Is there anything that can be done to alter this behaviour?

Regards
Eddy
Title: Re: SMF Links
Post by: SMFHacks on February 02, 2009, 07:55:28 pm
Not yet. I would need to create another template in the links template to do a message form.
Title: Re: SMF Links
Post by: Riley on February 03, 2009, 05:54:58 pm
I love this mod!! Is there any way like the Classifieds that the child boards can be hidden on the main page?

Any update on if this will be made for 2.0?
Title: Re: SMF Links
Post by: Paddleducks Forum - Damien on February 03, 2009, 05:58:58 pm
Not yet. I would need to create another template in the links template to do a message form.

Thanks, I hope it's a modification that can be added to the next version?

Regards
Eddy
Title: Re: SMF Links
Post by: TrailMyx on February 04, 2009, 02:46:42 pm
This is the only mod left that's preventing me from migrating to 2.0.  Wonderful mod, IMHO.  Looking forward to it in 2.0.  Great job with all your mods, they are top notch.
Title: Re: SMF Links
Post by: Riley on February 12, 2009, 10:46:22 am
I love this mod!! Is there any way like the Classifieds that the child boards can be hidden on the main page?

Any update on if this will be made for 2.0?

Any help with this would be appreciated!!
Title: Re: SMF Links
Post by: Riley on February 14, 2009, 08:59:24 am
Any help on this would be appreciated. I am holding up opening a new site until I can get this resolved.
Title: Re: SMF Links
Post by: SMFHacks on February 14, 2009, 10:45:33 am
Has been updated to 2.0
http://custom.simplemachines.org/mods/index.php?mod=381
Title: Re: SMF Links
Post by: lillitheve on April 18, 2009, 08:31:17 am
having an issue installing smf links...having to do the manual install of the mod for admin and subs. The lines I am supposed to search for in admin are not there.

smf version 1.1.8
tp version 1.0 beta 3
Title: Re: SMF Links
Post by: SMFHacks on April 18, 2009, 11:56:33 am
Those lines are for SMF 2.0
Title: Re: SMF Links
Post by: lillitheve on April 18, 2009, 12:19:35 pm
ok well I used the instructions on the site for 1.1.8, is the mod not for 1.1.x anymore?
Title: Re: SMF Links
Post by: xerycarla on April 28, 2009, 11:30:30 pm
i'm having problems with this mod.
gives users "error!" :

"Method Not Implemented

GET to /index.php not supported.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

and as far i've not been able to fix it, any answers?

thanks in advance
Title: Re: SMF Links
Post by: SMFHacks on April 29, 2009, 06:52:52 pm
That is an issue with mod_security read the following support topic
www.simplemachines.org/community/index.php?topic=3427
Title: Re: SMF Links
Post by: Paddleducks Forum - Damien on May 23, 2009, 04:19:12 pm
I've installed SMF Links 1.7.2 and it's mostly working fine, except for one annoying thing...

When a user enters a new link, it says "An error occurred", Your link needs to be approved before it's visible...

Yes the link needs to be approved, but it's NOT an error surely?

This is confusing a LOT of my users as they think there is a problem.... Is there anything that can be done to alter this behaviour?

Regards
Eddy

Just a polite reminder about the problem explained above....

regards
Eddy
Title: Re: SMF Links
Post by: xesse on October 01, 2009, 08:03:48 am
I just installed SMF Links, set the permissions, created a catagory and a link, but do not see any link to the link page on my forum.  Is there a button or text link to get there?
Title: Re: SMF Links
Post by: SMFHacks on October 01, 2009, 08:22:15 am
If you are using SMF 1.1.x and not the default theme you will need to add a link/button to the links page
Title: Re: SMF Links
Post by: xesse on October 01, 2009, 08:54:55 am
i'm using smf 1.1.10 and using the classic theme.  Is there something I can copy out of the default theme to place the button in the classic theme i'm using?  If so what template?
Title: Re: SMF Links
Post by: SMFHacks on October 01, 2009, 06:51:57 pm
For SMF 1.1.x it is different for each theme. The challenge for the classic theme is that a button will need to be created for it.
Title: SMF Links is not supporting UNICODE
Post by: Raji on November 04, 2010, 11:17:18 pm
Hello there,

I have just installed SMF LINK on SMF 2.0 RC4 without any issue but when I m trying to add link with Arabic script its showing ????????? instead of orignal script.

Please help me out to resolve this issue.

Thanks in advance
Looking forward
Baloch
Title: Re: SMF Links
Post by: Inter on November 07, 2010, 04:29:41 am
SMF 2.0 RC4  ???
Title: Re: SMF Links
Post by: WhiteEagle on February 18, 2013, 06:11:05 pm
Hi there,

I'd like to request a new feature for this mod:

Premium Links - payable via Paypal, but still need to be approved by the admin.

Thanks,
Nathan P.
Title: Re: SMF Links
Post by: SMFHacks on February 18, 2013, 06:53:09 pm
Maybe if I ever do a paid version of the mod but not likely due to time constraints.
Title: Re: SMF Links
Post by: ingleslenobel on April 27, 2015, 02:47:23 pm
Hello,

Does SMFlinks pass pagerank, and how scaleable is it?

Thank you
Title: Re: SMF Links
Post by: SMFHacks on April 27, 2015, 03:45:07 pm
No since it tracks visits
Title: Re: SMF Links
Post by: Nicole on August 16, 2020, 07:41:23 am
Is it possible to add code whoch is automatically displaying a thumbnail of the linked website?

Also it would be nice to have a feature which checks a links for its valdity before listing it.
Title: Re: SMF Links
Post by: SMFHacks on August 16, 2020, 08:03:42 am
Thumbnails are tricky You have to take a screenshot of the website. I had software that does it but too hard to add to SMF. The best bet is to find an API to do so.

Link checking is possible.
Title: Re: SMF Links
Post by: Nicole on January 08, 2021, 04:04:33 am
Hello, SMF Packs has such a feature in their link system. However I did not want to switch over to that mod as I have quite some work put into my link system. Also having a feature to autocheck an url wheter it is valied prior to submission would be good to have
Title: Re: SMF Links
Post by: SMFHacks on January 08, 2021, 08:31:51 am
Yeah that is paid product though.   Autocheck url would be possible. Thumbnails require a 3rd party service to take a picture of a website.
Title: Re: SMF Links
Post by: Nicole on January 08, 2021, 12:27:12 pm
I would throw in 15 usd for these features
Title: Re: SMF Links
Post by: SMFHacks on January 08, 2021, 01:00:25 pm
I could do autocheck if the url is valid or not.


Images would require an api maybe https://thumbnail.ws/compare-plans.html
Title: Re: SMF Links
Post by: Nicole on January 08, 2021, 01:08:40 pm
Well, would be interesting how SMF Packs does do it. Unfortunately ther eis no lonline Demo available
Title: Re: SMF Links
Post by: Nicole on January 08, 2021, 01:25:08 pm
I think this service might be a good option:

https://www.thumbalizr.com/features
Title: Re: SMF Links
Post by: Nicole on January 08, 2021, 01:29:45 pm
SMF Packs seems to be usinbg this one:

http://www.thumbshots.org/
Title: Re: SMF Links
Post by: SMFHacks on January 08, 2021, 02:11:35 pm
Looks like it doesn't work pricing page doesn't load
Title: Re: SMF Links
Post by: Nicole on January 09, 2021, 03:29:55 am
I would appreciate if the following could be added to the links directory:

- Checking if URL is valid - best via Ajax

- Screenshoot

- Search Function

- Avatar of the person who posted a link
Title: Re: SMF Links
Post by: Nicole on January 09, 2021, 03:30:14 am
I would throw in USD 20.00 for changes. Anyboidy else who would like to contribute?
Title: Re: SMF Links
Post by: Nicole on January 10, 2021, 12:02:39 pm
Anybody else willing to contribute?