Advertisement:
NameCheap

Author Topic: Copy Topics v1.6 - Updated for SMF 2.0!  (Read 65611 times)

Offline SMFHacks.com Team

  • Jr. Member
  • **
  • Posts: 233
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Copy Topics v1.6 - Updated for SMF 2.0!
« on: January 22, 2008, 11:19:07 PM »
Copy Topics

Originally by: Karl Benson
Compatibility: SMF 1.1.x, SMF 2.0.x   

Link to Mod | Comments |                 
Current Version: 1.6
Languages:


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 number of them.
The more topics and/or the more posts in the topic, the more queries will be used.



Features
Adds Copy Topic permission for membergroups
Copy a single topic from the Topic Display
Copy a single or multiple topics from the Message Index
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
        SMF 2.0 version works with 2.0 feature of multiple attachment folders



Installation
Any previous versions of this mod MUST be uninstalled BEFORE installing this version.

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
Manual Installation Of Mods
How Do I Modify Files?



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



Changelog
11/16/09
o Updated to support RC2

6/17/09 - v1.5.1
o Fixed some minor bugs on install.
o Fixed Hungarian Language.

6/12/09 - v1.5
o Updated compatibility for 1.1.9 and 2.0 RC1-1

5/15/08 - v1.4
o Checked works for SMF 1.1.5 and SMF 2.0 Beta 3.1
o Fixed Undefined $txt string Permission bug in 2.x version only (Thanks to Jelle Mees)
o Added Portuguese/Portuguese-utf8 language strings (Thanks to joomlamz)

3/21/08 - v1.3
o Fixed to make install for SMF 2.0 Beta 3 Public

3/15/08 - v1.2
o Removed/disabled copying of 'cached search entries' as causing duplicate key issues

3/2/08 - v1.1
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

1/22/08 - v1.0
o Initial release.
« Last Edit: June 23, 2011, 07:59:18 PM by vbgamer45 »
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: Copy Topics
« Reply #1 on: January 22, 2008, 11:24:45 PM »
{post reserved: for notes and info later}

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,512
  • Gender: Male
  • Suporte Joomla.co.mz
    • http://www.facebook.com/aplicnet.hosting on Facebook
    • @aplichosting on Twitter
    • Webdesign
Re: Copy Topics v1.0
« Reply #2 on: January 22, 2008, 11:44:08 PM »
nice work
good



Offline edi67

  • SMF Hero
  • ******
  • Posts: 1,532
  • Gender: Male
  • Italian Supporter
    • CrazyZone
Re: Copy Topics v1.0
« Reply #3 on: January 23, 2008, 04:25:51 AM »
great mod Karl
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Offline jossanaijr

  • SMF Hero
  • ******
  • Posts: 2,131
  • Gender: Male
    • Netbook Forum
Re: Copy Topics v1.0
« Reply #4 on: January 23, 2008, 06:17:21 AM »
Hi Karl,
great mod.  Thanks.
What I would like to have is an option to have a link in the copied topic of the original one.
I'm using this mod to create a board that I've been looking for:  Have a "best topic of the week".  So I installed this mod but did not give permission to copy but me.  Then I copy one topic (to this board) that I will delete every week replacing it by a new one.  But members cannot reply in this copied topic, only in the original.  So it is why I'm asking for this link.

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: Copy Topics v1.0
« Reply #5 on: January 23, 2008, 06:49:11 AM »
I considered having that option.

However for SEO reasons I decided not to include the functionality

Offline MinasC

  • Full Member
  • ***
  • Posts: 423
  • Gender: Male
    • The Copycat
Re: Copy Topics v1.0
« Reply #6 on: January 23, 2008, 07:07:32 AM »
great as always karl ! bravo !

Offline jossanaijr

  • SMF Hero
  • ******
  • Posts: 2,131
  • Gender: Male
    • Netbook Forum
Re: Copy Topics v1.0
« Reply #7 on: January 23, 2008, 07:35:49 AM »
I considered having that option.

However for SEO reasons I decided not to include the functionality
Ok, thanks.

Offline CiOooo

  • Jr. Member
  • **
  • Posts: 203
  • Gender: Male
    • Sizin PlatForumunuz
Re: Copy Topics v1.0
« Reply #8 on: January 23, 2008, 09:59:23 AM »
hello :)
If u publish the turkish translation of this mod, here it is.. ;)
thnx 4 mod, tchau :D

Code: [Select]
$txt['copytopic_copyto'] = 'Kopyala';
$txt['quick_mod_copy'] = 'Seçileni Kopyala';
$txt['copytopic'] = 'Konuyu Kopyala';
$txt['copytopics'] = 'Konuları Kopyala';
$txt['cannot_copy'] = 'Bir konuyu kopyalamak için gereken izinlere sahip değilsiniz';
$txt['copytopic_noboards'] = 'Bu konunun kopyalananabileceği kategori bulunmamakta!';
$txt['copytopic_notallowed'] = 'Kategorilere konuları kopyalamaya yetkili değilsiniz,görüntüleyemezsiniz!';
$txt['permissionname_copy'] = 'Konuyu Kopyala';
$txt['permissionhelp_copy'] = 'Konuyu bir kategoriden diğerine kopyalar. Kullanıcılar, sadece görmelerine izin verilen kategorileri seçebilirler';
$txt['copytopic_negativeseo'] = 'Konular kopyalanırken SEO açısından olumsuz etkiler görülebilir yani arama motorları içeriğin tekrarlı yani iki suretli olduğunu tespit edebilirler.';



Offline erlend_sh

  • Jr. Member
  • **
  • Posts: 307
  • Gender: Male
  • Lack of sleep is my drug
    • jMonkeyEngine
Re: Copy Topics v1.0
« Reply #9 on: January 23, 2008, 10:10:28 AM »
I recall asking for a mod like this earlier, so this is really great news!

Maybe I'll make a translation into Norwegian, German and Spanish for it when I get home.

Thanks for a great mod!

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,507
  • Gender: Female
Re: Copy Topics v1.0
« Reply #10 on: January 23, 2008, 06:23:05 PM »
Again, Karl, kudos for making an innovative and ingenious mod. I don't have a need for the functionality at the moment, but I do like the concept. Good job.
Do NOT PM me for support.

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

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: Copy Topics v1.0
« Reply #11 on: January 23, 2008, 07:16:57 PM »
Thanks Eliana.

P.S don't look at the code unless you want a headache. ;)

Something like 90% is made up of queries

Offline eleven0

  • Jr. Member
  • **
  • Posts: 216
Re: Copy Topics v1.0
« Reply #12 on: January 23, 2008, 07:20:17 PM »
It's great to see this feature on SMF.  Thanks Karlbenson :)

Offline Eliana Tamerin

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,507
  • Gender: Female
Re: Copy Topics v1.0
« Reply #13 on: January 23, 2008, 07:34:26 PM »
Now you made me look at the code. Wow, that's a headache. I don't think I've seen that many queries in a file before.
Do NOT PM me for support.

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

Offline kamili34

  • Jr. Member
  • **
  • Posts: 232
  • Gender: Male
  • noob
    • pilarki.org
Re: Copy Topics v1.0
« Reply #14 on: January 25, 2008, 08:51:30 PM »
Thanks for this

Offline forumguy

  • Semi-Newbie
  • *
  • Posts: 25
Re: Copy Topics v1.0
« Reply #15 on: January 27, 2008, 05:02:21 PM »
This is great, I asked for something like this earlier.  In my case, I would want the +1MB attachments to go with the copy.  Is there any way to make it an option to specify the size limit, or disable the 1MB limit?

Thanks!!!

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: Copy Topics v1.0
« Reply #16 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.

Offline ceewee

  • Jr. Member
  • **
  • Posts: 110
  • Gender: Male
    • United World Forum
Re: Copy Topics v1.0 -english-utf-8
« Reply #17 on: January 28, 2008, 07:13:56 AM »
Have a strange thing, when testing install in package manager it's all ok but test failed on english-utf-8, which btw I don't have any .
It says
9.     Execute Modification     ./Themes/default/languages/Modifications.english-utf8.php     Test failed
So I don't have any UTF8 files!?
Other files I don't have it just skips like:
11.     Execute Modification     ./Themes/default/languages/Modifications.english_british-utf8.php     Skipping file

I have more mods, not of you btw, which has same or similar test failed on utf8:

referals mod, languagecompare and topicsfilter.


Should I just install and ignore that utf8?
Or place the utf8-files I need for your mods in forum?
==========================================
added: checked files in forum, although I don't have any utf8 languages I seem to have that Modifications.english-utf8.php,
will have to add that manually I assume.
« Last Edit: January 28, 2008, 07:21:26 AM by ceewee »

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Criminal Solicitors
Re: Copy Topics v1.0
« Reply #18 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.

Offline forumguy

  • Semi-Newbie
  • *
  • Posts: 25
Re: Copy Topics v1.0
« Reply #19 on: January 28, 2008, 09:08:44 PM »
Would it be possible to write the mod so that instead of actually copying the file, it just references the existing file?  There would be a problem if the file in the original post was deleted, but maybe there can be a check put in and it would preserve the file if there was a link to it... just a thought.