News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

RenameTopic

Started by JayBachatero, July 12, 2006, 12:32:17 AM

Previous topic - Next topic

tapirul

this is exactly what I did after your last post (replly 13), but the button doesn't show in the "normal buttons" area, and this is what puzzles me; this and the fact that regular users cannot rename their topics even if they are allowed to (i get that
8: Undefined index: cannot_rename_topic
File: /...Sources/Errors.php
Line: 336

error)
I'll try it in a different theme to see how it works...

tapirul

#21
.........so, it seems it has something to do with permissions...
the buttons show allright for admin... They don't show for regular users, even if they have permissions set...
an if it shows (in the original position), it gives me the error...

JayBachatero

Ok I'll look into it.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

JayBachatero

! RenameTopic tab was not checking permission correctly (Display.template.php)
! Language string for error was missing (Errors.english.php)
! Permissions were not being picked up correctly for rename_topic_own and rename_topic_any (RenameTopic.php)

You should be able to upgrade from the other versions.  No need to uninstall.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

lorddraco

Hi ... me using Babylon Theme.... anyway to teach me how to mod the theme to include your function?

JayBachatero

In Display.template.php for the Babylong theme

Code (find) Select

return implode($context['menu_separator'], $moderationButtons);


Code (add before) Select

// Rename Topic
if (allowedTo('rename_topic'))
$moderationButtons[] = '<a href="' . $scripturl . '?action=renameTopic;topic=' . $context['current_topic'] . '">' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/rename_topic.gif" alt="' . $txt['rename_topic'] . '" />' : $txt['rename_topic']) . '<a>';


Upload this image to the /Themes/babylon/images/english dir.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

K_4_kelly

hi Jay,

can i have this with the chinese word available to show as well?

thanks  ;D

Simplemachines Cowboy

#27
Again, I have installed the latest version, and I have no button on the mod bar at the bottom, and I see no place in the admin section to change to allow admin and mods permission to use this feature.
I'd really like to have this but it says it installs correctly, but I cannot find any evidence that it exists.

Except for these two errors:"
Quotehttp://www.mydomain.net/forum/index.php?action=permissions;sa=modify;group=2
8: Undefined index: permissionname_rename_topic_any
File: /home/mydomain/public_html/forum/Sources/ManagePermissions.php
Line: 1417
and
Quotehttp://www.mydomain.net/forum/index.php?action=permissions
8: Undefined index: permissionname_rename_topic_own
File: /home/mydomain/public_html/forum/Sources/ManagePermissions.php
Line: 1413
My SMF forum: The Open Range

JayBachatero

Simplemachines Cowboy are you using RC2?

K_4_Kelly sure.  Try this file.  BTW I released another version of the Global Announcements mod if you are interested ;).
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

K_4_kelly

hi Jay..

thanks ya!  I replaced the renametopic.php already.. will try it later!

I m definitely interested in the another version of the Global Announcements Mod.. :D
Have you already Post it?  Could you please send me the URL, so that I can go and check it out...
by the way, what is the difference between the two versions?

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Simplemachines Cowboy

I am using RC2 and I installed this file:
RenameTopic_1-0-2.tar.gz
My SMF forum: The Open Range

JayBachatero

Did you receive any errors on install?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Simplemachines Cowboy

No.
It installed ok according to the package installer.

Here is my manage_permissions revelant sections regarding the errors I posted earlier:

1406 $context['permissions'][$permissionType]['columns'][$position][$permissionGroup]['permissions'][$perm] = array(
1407 'id' => $perm,
1408 'name' => &$txt['permissionname_' . $perm],
1409 'show_help' => isset($txt['permissionhelp_' . $perm]),
1410 'has_own_any' => $has_own_any,
1411 'own' => array(
1412 'id' => $perm . '_own',
1413 'name' => $has_own_any ? $txt['permissionname_' . $perm . '_own'] : ''
1414 ),
1415 'any' => array(
1416 'id' => $perm . '_any',
1417 'name' => $has_own_any ? $txt['permissionname_' . $perm . '_any'] : ''
1418 )
1419 );
1420 }
My SMF forum: The Open Range

JayBachatero

I have a feeling that the ManagePermission modification failed.  Can you post that file so that I can look into it?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Simplemachines Cowboy

You want the whole Sources/ManagePermissions.php file posted?
My SMF forum: The Open Range

JayBachatero

Yea. You are a CM so you can post attachments.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Simplemachines Cowboy

#37
Here ya go.

It did change my file - the old file is 50641 bytes and the new one is 50670 bytes.
My SMF forum: The Open Range

JayBachatero

Umm seems like the mod installed twice.  Check the other files to see if the code is repeated.  Also remove 'rename_topic' => true, from the ManagePermissions.php file.  Remove one of them.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

daragor

works un RC3? i need this great mod!
Webscom: Wordpress + SMF
Software Libre, Noticias y Entretenimiento.-

Advertisement: