News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SMF Links

Started by SMFHacks.com Team, July 12, 2006, 12:33:28 AM

Previous topic - Next topic

TrueSatan

You've pretty much said it for yourself I suspect...you've 150 mods...with anything like that number clashes and unexpected results are almost a certainty.

Standard advice is to keep the number of mods you add as low as you can tolerate...only add the mods you really need. Do you really need more than a fraction of that vast array of mods?

vbgamer45 will read this topic when he has time...he's a busy person who does a great deal for SMF. Private contacts aren't likely to be wanted as they just add to his workload...most of the people who do a lot here try to avoid having PMs to answer as well.

catchpen

Quote from: ES23 on October 02, 2007, 09:57:50 AM
I've tried installing on another forum and it works fine ... .... ;) So what's the problem now?Sigh ... I have over 150 mods in my forum and it is a big pain to install all of them over again....

150? I gotta see this.  plz share the link!

catchpen

Thanks for yet another great mod. I was wondering how I was going to do this and boom you already did it!

I have one question but it might be more of a theme CSS problem. - I use the Mesh theme and the top menu is text links not gif buttons. I changed the name instead of "Links" I changed it to "Rate Links" I got it to work BUT the only thing it did like a word wrap thing and the "links" text was below the "rate" text, which didn't look right with the rest of the menu.  Do you guys know why it did this and if there is another topic on this please link me up.

Thanks,
C.P.

TrueSatan

It's really a theme issue and not to do with this mod...you'd be best asking on the topic for the theme on the themes pages where the theme author might either have answered this already or be able to sort it out for you.

catchpen

Thanks for the reply.
BTW got it to work by adding a space character instead of space bar between link ratings words (alt+0160) might be something to keep in mind

GhostM8

#325
Hello,

In an attempt to move categories up and down, I have recieved the following error:


I am running SMF 1.1.4 & SMF Links 1.6.5

Does anyone know how to fix this?


function CatUp()
{
global $db_prefix, $txt;
//Check if they are allowed to manage cats
isAllowedTo('links_manage_cat');

//Get the cat id
$cat = (int) @$_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($txt['smflinks_nocatabove'],false);
$row2 = mysql_fetch_assoc($dbresult);


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

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, $txt;

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

//Get the cat id
$cat = (int) @$_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($txt['smflinks_nocatbelow'],false);
$row2 = mysql_fetch_assoc($dbresult);


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

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');
}

microbone

#326
hey there....

is there a way to add a custom image to each link?

ex. adding google.com [nofollow] as link and also add a little google.com [nofollow] logo infront like the categories...

nice mod btw :)

best regards
.....bone

DeMar

Hello,

can someone help me.
I installed this mod. I want to see it properly on my theme and in croatian.
Which files do I have to translate and modife???

Thanks.

[embed-flash(width,height)]

TrueSatan

Please refer to the official SMF documentation for advice on translating mods (link at top of page in nav bar.) Look at Links.english.php Links.english-utf8.php Modifications.english.php Who.english.php In each case leave the English files unaffected and add/edit your Croatian files as needed.

As regards themes...either refer to the SMF documentation on adding mods to themes or if in doub to the theme creator.

DeMar

#329
So I have checked and translated what I need.

I have one question else: Where and how can I put a new one button for the link page. I want to have the button on the top, where are buttons home, help, search, profile...?

Thanks

[embed-flash(width,height)]

DeMar

Quote from: Dean B on October 24, 2007, 01:18:55 PM
So I have checked and translated what I need.

I have one question else: Where and how can I put a new one button for the link page. I want to have the button on the top, where are buttons home, help, search, profile...?

Thanks

SOLVED!!!
Thanks to all

[embed-flash(width,height)]

microbone

@Dean B 
why not share your solution then.....

DeMar

You need to make this in your current theme, file index.template.php!

  // 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('links','search', 'admin', 'usercp', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))



    // Links
   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">Linkovi</a>
            </td>' , $current_action == 'chat' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


In the first code I posted you must only write this(it's missing): 'links' ---see code 1 .. the last line!

Code 2 you must copy all some lines later! There where you want your button!
I mean between the buttons, for example "usercp" & "calendar"!

I hope I helped you.

[embed-flash(width,height)]

DeMar

I have a question!
I had the "add link", and now it is gone! Have it on default theme, but in my own theme not
Where (which file) can I find it to check!

[embed-flash(width,height)]

DeMar


[embed-flash(width,height)]

sasawawa

I have installed the SMF links mod successfully, and added the new tag "links" to my homepage.

When my members click the links button, got an error :

An Error Has Occurred!


Back


Any one can help me ?

:'(

DeMar

I think you must change permission for your members! Maybe they are not allowed to view the links!

[embed-flash(width,height)]

sasawawa

#337
Nope ,i  enabled guests and members permission.

Member Group Name     View     Add Link     Edit own Link     Delete own Link     Options
Global Moderator   Allowed   Allowed   Allowed   Allowed   [Delete]
Administrator   Allowed   Allowed   Allowed   Allowed   [Delete]
Portals   Allowed   Allowed   Allowed   Allowed   [Delete]
Regular Members   Allowed   Allowed   Allowed   Allowed   [Delete]
Guests   Allowed   Allowed   Allowed   Allowed   [Delete]



But it doesn't work either. Once my members click the "links" tag, got the error:

An Error Has Occurred!


Back



Any one can help me ? :'(

Hoochie Coochie Man

Hi, this is great mod.

Can we show latest links in the main page (boardindex.template.php)?

Thank you..
İnadına SMF 1.1.X

DeMar

I have a question!
I had the "add link", and now it is gone! Have it on default theme, but in my own theme not!
Where (which file) can I find it to check and change this!

Thanks

[embed-flash(width,height)]

Advertisement: