News:

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

Main Menu

Copy Topics

Started by SMFHacks.com Team, January 22, 2008, 11:19:07 PM

Previous topic - Next topic

ceewee

Quote from: karlbenson on January 28, 2008, 07:30:32 AM
It maybe that another mod has created a BLANK modifications.english-utf8.php
Open Themes/default/languages/Modification.english-utf8.php
If its blank, then delete it.

It isn't blank, has 2 lines in it, also there's the same file with a ~that has 1 line in it.

Possibly with already 83 mods, I've strechted my luck sofar beiing able to install thru
package manager, so have to do it thru the package parser for the rest i want to install.

Got lucky sofar.

forumguy

Quote from: karlbenson on January 28, 2008, 05:32:18 AM
The limit is 1mb.  I would not even recommend copying 1mb files.  This is because your servers can't usually handle it.

In fact, based on some testing I've done since submiting the mod and another user has sent me.
I may need to reduce the amount.
Possibly making it less than 1mb TOTAL for attachments in all the topics your copying.

So if your copying 5xtopics at once, the max size attachments that could be copied is 1mb.

Could it be written to, instead of duplicate the attachment, simply reference the existing attachment?  Some sort of error logic would have to be written to prevent the deletion of the file by deleting the original thread, but other than that I don't see why this approach wouldn't work... Thoughts?

Cheers.

karlbenson

@ceewee
I'll make it easy for you.
Open Themes/default/languages/Modifications.english.php
Copy everything into (and replace whatever is inside)
Themes/default/languages/Modifications.english-utf8.php

@forumguy 
I looked into that, however SMF's attachment system ties Attachments to messages.
It would be a huge undertaking to re-write Attachments for it.  Far too much work for the benefit.
When working on the mod I was going to leave out attachments completely due to potentially trying to copy large files.
After discussion with some smf'ers they convinced me to support 99% of attachments which are less than 1mb and would copy easily.

Ideally ForumGuy I think people who use alot of attachments need to lobby/request SMF improve the attachment system to allow attachments to be attached to different messages and such.

Overall I would say I don't plan to add much functionality to this mod.
Also because its 98% queries I'm going to have some fun trying to update this for 2.0 and the new querying method.

forumguy

Okie dokie, thanks for listening to my thoughts and thanks for creating a MUCH NEEDED mod. :)

ceewee

Quote from: karlbenson on January 28, 2008, 07:30:32 AM
It maybe that another mod has created a BLANK modifications.english-utf8.php
Open Themes/default/languages/Modification.english-utf8.php
If its blank, then delete it.
When checking it in package parser I found that it missed both <?php and ?>
That would cause it to : test failed.
Have several other mods with same error, will install them to see if that solves that problem.

karlbenson

Your Modifications.english-utf8.php was probably created in error.

You will probably keep getting the error if smf can't find a ?> in the file.

ceewee

Quote from: karlbenson on January 30, 2008, 09:14:25 AM
Your Modifications.english-utf8.php was probably created in error.

You will probably keep getting the error if smf can't find a ?> in the file.
Yes, corrected that and 5 mods with that utf8 error now install without problems, one mod..-german had same problem. Will keep that in mind..have now 92 mods, up to 100... :-)
THX

karlbenson

Your like me then.

My forum has over 100 mods installed.

ltdeta

German translation :)

$txt['copytopic_copyto'] = 'kopieren nach';
$txt['quick_mod_copy'] = 'kopiere markierte Themen nach';
$txt['copytopic'] = 'kopiere Thema';
$txt['copytopics'] = 'kopiere Themen';
$txt['cannot_copy'] = 'Du hast keine Berechtigung, die es dir erlaubt ein Thema zu kopieren';
$txt['copytopic_noboards'] = 'Es gibt kein Board in die du das Thema kopieren kannst!';
$txt['copytopic_notallowed'] = 'Du bist nicht berechtigt Themen in Boards zu kopieren, auf die du keinen Zugriff hast!';
$txt['permissionname_copy'] = 'kopiere Thema';
$txt['permissionhelp_copy'] = 'kopiert ein Thema von einem Board in ein anderes. Benutzer können nur Boards als Ziel auswählen, auf die sie Zugriff haben';
$txt['copytopic_negativeseo'] = 'Beachte, das kopierte Themen von Suchmaschinen, aufgrund negativen SEO (Search engine optimization) Effekte, als doppelter Inhalt gedeutet werden könnte.';


forumguy

Quick question, is there any easy way to make the copy button (or hyperlinked text) show up in other themes?

karlbenson

You need to manually edit the theme onto other themes.

Using an SMF Package Parser can help
http://www.adrevenueshare.com/parser

forumguy

Ok, cool.  Thanks for the tip!

lookang

 Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Installation Readme
COPY TOPICS v1.0
By Karl Benson
Link to Mod | Support Topic | Donate


Compatibility
For SMF 1.1.x Only

Introduction
Adds the ability to copy a single or multiple topics.

Note: The copying functions contain some very memory intensive mysql queries, and there are a considerable no. of them.
The more topics and/or the more posts in the topic, the more queries will be used.

Features
o Adds Copy Topic permission for membergroups
o Copy a single topic from the Topic Display
o Copy a single or multiple topics from the Message Index
o Copies the entire topic
- Updates users postcount/post based membergroups accordingly
- Updates all necessary stats
- Copies Calendar/events tied to the topic
- Copies Entire polls
- Copies Attachments
   > less than 1MB in size only
   > Providing you haven't exceed any Maximum Attachments directory size
o Supports Languages
- English/English-utf8
- English_British/English_British-utf8
I welcome translations for other languages. Please post the translated language strings in the Support Topic.

Installation
Simply install the package to install on the SMF Default Core Theme ONLY.

Manual edits will be required for ALL themes (other than SMF Default Core Theme) which have a custom MessageIndex.template.php and/or Display.template.php

If your theme has its own versions of the language files Modifications.english.php and/or Modifications.english-utf8.php, OR if your using a language other than those supported (listed above) by the mod then you will need to copy the language strings into each custom version of those files.

You will also need to copy the images into each Theme
Themes/{themename}/images/buttons/admin_copy.gif
Themes/{themename}/images/icons/quick_copy.gif

Useful Links
SMF Package Parser
Manual Installation Of Mods
How Do I Modify Files?

Donate
Has this modification helped you? Support the developer by Donating

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
1.0 BETA - 22nd January 2008
o Initial release.

Install Actions
Installations actions for "Copy Topics":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Sources/Subs-Boards.php    Test successful
3.    Execute Modification    ./Sources/Display.php    Test successful
4.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
5.    Execute Modification    ./Sources/MessageIndex.php    Test successful
6.    Execute Modification    ./Themes/default/MessageIndex.template.php    Test successful
7.    Execute Modification    ./Themes/default/Display.template.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
9.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Test failed
10.    Execute Modification    ./Themes/default/languages/Modifications.english_british.php    Skipping file
11.    Execute Modification    ./Themes/default/languages/Modifications.english_british-utf8.php    Skipping file
12.    Extract File    ./Sources/CopyTopic.php    
13.    Extract File    ./Themes/default/CopyTopic.template.php    
14.    Extract File    ./Themes/default/images/buttons/admin_copy.gif    
15.    Extract File    ./Themes/default/images/icons/quick_copy.gif

help!!

karlbenson

Your issue with with Modifications.english-utf8.php

Open
./Themes/default/languages/Modifications.english-utf8.php

Copy ALL the strings FROM ./Themes/default/languages/Modifications.english.php into the utf8 file.



lookang

this is my /public_html/forum/Themes/default/languages/Modifications.english-utf8.php


$txt['socialbookmarks'] = 'Social Bookmarks';
$txt['attachment'] = ' [ Attachment ] ';
$txt['attachment_nopermission'] = ' [ Attachment: You are not allowed to view attachments ] ';
$txt['attachment_invalid'] = ' [ Attachment Invalid Or Does Not Exist ] ';
$txt['attachment_disabled'] = ' [ Attachments Disabled ] ';
$txt['attachment_insert'] = 'Insert Attachment';

is this what you need to debug my error message? :D

Eliana Tamerin

No, he wants you to open your Modifications.english.php and copy everything there into Modifications.english-utf8.php.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

lookang

COOL man!!! it works!!! thanks! :D

dcorc

I'd just like to add a huge "thanks" to you, for coding this mod !


Dave

karlbenson

1.1 - 2nd March 2008
o Converted mod to work for SMF 2.0 beta 2 (and above) (won't work for earlier 2.0 versions)
o 2.0 version takes account of SMF 2.0 multiple attachment folders
o Added German/German-utf8 language strings (Thanks to ltdeta)
o Added Turkish/Turkish-utf8 language strings (Thanks to CiOooo)
o Fixed: Copying multiple topics to copy in the exact same order
o Fixed: Removed LIMIT 1 from UPDATE clauses since sqlite doesn't support them

c a g a t a y

First of all this is a great job for me
I installed this mod and it is good working

But;

Although I put images to the right folder I cant see icons ?



I am using SMF 1.1.2  and DEFAULT THEME

Any idea ?

Advertisement: