Post Threads to Twitter

Post Threads to Twitter 1.0

No permission to download
Compatible XF 2.x versions
2.0
Additional requirements
Twitter Apps account
If you are like me, you don't want every thread in your forum to be sent "automatically" to your forum's twitter account, especially for busy forums. This template modification plus a small php script will give your forum moderators the freedom to send any thread to the forum's twitter account. You won't need to give the Mods a direct access to the account.

Every thread will have a twitter blue button next to the inline moderation buttons (as in the following image):

Screen Shot 2018-05-02 at 1.47.09 AM.png


INSTALLATION:

First: PHP script
  1. Unpack the attached download file into your forum directory.
  2. Modify "config.php" with:
    1. Twitter App information. (You can obtain one from https://apps.twitter.com)
    2. Database Information.
    3. Site URL (without the trailing slash)
    4. Adjust the strings to your translation needs.
Second: Template Modification
  1. In template "thread_view" find the following:
    Code:
                        <xf:if is="$canInlineMod">
                            <xf:macro template="inline_mod_macros" name="button" />
                        </xf:if>
  2. Replace it with the following:
    Code:
                        <xf:if is="$canInlineMod">
                        <span class="tweet"><a class="shareButtons-button shareButtons-button--twitter" target="_New" href="javascript:window.open('tweetpost/tweet.php?id={$thread.thread_id}&title={$thread.title}&username={$thread.username}&action=update','mywindowtitle','width=500,height=150')"><i aria-hidden="true"></i></a></span>
                        </xf:if>
                        <xf:if is="$canInlineMod">
                            <xf:macro template="inline_mod_macros" name="button" />
                        </xf:if>
Third: Database Table Creation
  1. Find the sql file included "tweeted_threads.sql" (You can find it in the folder created above)
  2. Run it in your forum database to create the required table.

That's it.
Author
jazz_aaf
Downloads
15
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from jazz_aaf

Top