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

vbgamer45

Only members can edit and delete their own links.

Admins can do anything.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

irwin

sorry, another little question: i have a category only for "premium" member - and only who is inside this category can see the link. Now all is right.. until: 'Top Five Visited Links' because the link are visible there also for the guest...
but the guest can't choose ths link.. mybe is only  little mistake because in the Permission list they don't have this choosen.


Abavagada

For those users that are running this under 1.11 and still can't allow users to edit and delete their own links, I suggest making this change to the Sources/ManagePermissions.php file:

Change:
'smflinks' => array(
            'view_smflinks' => false,
            'add_links' => false,
            'edit_links' => false,
            'delete_links' => false,
            'links_manage_cat' => false,
            'approve_links' => false,
            'links_auto_approve' => false,
            'rate_links' => false,
         ),

To:

'smflinks' => array(
            'view_smflinks' => false,
            'add_links' => false,
            'edit_links' => array (
               'edit_links_any' => true,
               'edit_links_own' => false
            ),
            'delete_links' => array (
               'delete_links_any' => true,
               'delete_links_own' => false
            ),
            'links_manage_cat' => false,
            'approve_links' => false,
            'links_auto_approve' => false,
            'rate_links' => false,
         ),

Then try changing the permissions in the normal forum permissions area, by groups.

Also, if anyone wants to see it running on my site (which is still under construction):
http://www.parleremo.org/forum/index.php?action=links

However, I have hacked mine a bit for appearances and the thumbnails.

Hope this helps someone.

kassie

Members can't edit or delete their own links just as I wanted global mods to edit & delete there own links.
I've changed the permissions in both places & its still not working. I've uninstalled  & reinstalled .... still no good.

Quote from: vbgamer45 on July 15, 2010, 10:51:51 PM
Only members can edit and delete their own links.

Admins can do anything.

1legspider

Hi Great Mod from what I have seen so far (have only been able to partially install it correctly)

In Installation, Having this problem when attempting to do this on a new 1.1.11 Install. Have downloaded package afresh and installed/uninstalled a number of times to no avail...

Can You help?

Template Parse Error!

There was a problem loading the /Themes/default/languages/Modifications.english-utf8.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

Parse error: syntax error, unexpected T_VARIABLE in .../Themes/default/languages/Modifications.english-utf8.php on line 3
1: <?php// Version: 1.1; Modifications//Begin SMF Links Text Strings$txt['smflinks_menu'] = 'Links';$txt['smflinks_admin'] = 'Links Configuration';$txt['smflinks_linkssettings'] = 'Links Settings';$txt['smflinks_managecats'] =  'Manage Categories';$txt['smflinks_catpermlist'] = 'Category Permission List';$txt['smflinks_approvelinks'] = 'Approve 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.';$txt['permissionname_delete_links_own'] = 'Own Link';$txt['permissionname_delete_links_any'] = 'Any Link';$txt['permissionname_edit_links_own'] = 'Own Link';$txt['permissionname_edit_links_any'] = 'Any Link';//END SMF Links Strings   
2: //Begin SMF Links Text Strings
3: $txt['smflinks_menu'] = 'Links';
4: $txt['smflinks_admin'] = 'Links Configuration';
5:
6:
7: $txt['permissiongroup_smflinks'] = 'SMF Links';

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

1legspider

Thank you vbgamer45 for your prompt response,

Coincidently had just found a corrupted Modifications.english-utf8.php file which when replaced, worked just fine...

Have made a small Donation today for great work  ;)

Regards,
1leg, Gerald

Spuds

Quote from: Spuds on July 16, 2010, 10:06:41 PM
When you have a multi page list of links, and you do a sort by column, for example title, the sort order is not passed to the second page (ie the page links are not built to respect the current sort order)

so for example, after sorting on title on the first page you get
index.php?action=links;cat=1;start=0;sort=title;sorto=ASC

but the page 2 link will be
index.php?action=links;cat=1;start=15

Here is my fix for 2RC3, in the Links2.template.php file (themes/default) 

find
$context['page_index'] = constructPageIndex($scripturl . '?action=links;cat=' . $cat, $_REQUEST['start'], $total, $modSettings['smflinks_setlinksperpage']);


replace
$context['page_index'] = constructPageIndex($scripturl . '?action=links;cat=' . $cat . (isset($_REQUEST['sort']) ? ';sort=' . $_REQUEST['sort'] : '') . (isset($_REQUEST['sorto']) ? ';sorto=' . $_REQUEST['sorto'] : ''), $_REQUEST['start'] , $total, $modSettings['smflinks_setlinksperpage']);


(Same fix should work on 1.1 but the file would be Links.template.php and I have only tested this on 2.0)


vbgamer45

Thanks spud for the fix.
Can't believe the permission one went for so long posted a new update to fix those two issues

2.3
!Fixed permission issue for edit/delete links now has own and any
!Fixed issue with lost sort order on paging
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

KensonPlays

what about a php block to randomly show one (or 3) links?

i have asked before and need this!

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

KensonPlays

dont know to query it with php, all i know is "echo" and "include".

i have no prefix for smf tables its main site so "links" table?

vbgamer45

Yeah so it is the main links table. It really is pretty easy to do. Just use the smf query functoin and you can fetch the row and display it with echo
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

KensonPlays

What is the query code in PHP? I dunno how. I only know echo and include file code. That is all

vbgamer45

How I started I looked at other mods and saw how they worked then made my own. There are only a handful of php statements that really need to be known
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

KensonPlays

Thanks for the help, not!


<?php
echo ("links.sql");
?>



Is that part of it?

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

KensonPlays

Since I don't know how SQL and PHP work except to store DB info, I can't echo out that kind of information.

KensonPlays

#778
hello? just the one command will do. Once this happens I will most likely never return to this topic!

EDIT:
Nevermind, I asked a question on www.vark.com

EDIT 2:
The answer wasn't very helpful.
Quote from: Mathias K; http://vark.com/channels/24640329
Try reading up on mysql and PHP. It's really easy to just select stuff from a database and display 'm at random. Check out php.net, forums.devshed.com (go to php section) or google for random row from mysql

I am too busy to research it!

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: