vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - WS vBulletin Tweet Poster (https://vborg.vbsupport.ru/showthread.php?t=236278)

Mosh 04-01-2012 10:09 AM

Quote:

Originally Posted by LouiseWilson (Post 2315617)
As this works with 3.8 I've installed it works but there is no
Hash tag field

Looks like the newthread template has changed in vBulletin 3.8.7..... so, in the AdminCP edit the vBulletin 2 Twitter: Add Hashtag Field To New Thread plugin via Plugins & Products -> Plugin Manager and completely replace the contents with the following:

PHP Code:

if ($vbulletin->options['ms_vbtwitter_enable'] && ($vbulletin->options['ms_vbtwitter_enable_hashtag'] == || $vbulletin->options['ms_vbtwitter_enable_hashtag'] == 3) && (!empty($vbulletin->options['ms_vbtwitter_twitter_consumer_key'])) && (!empty($vbulletin->options['ms_vbtwitter_twitter_consumer_secret'])) && (!empty($vbulletin->options['ms_vbtwitter_twitter_oauth_token'])) && (!empty($vbulletin->options['ms_vbtwitter_twitter_oauth_token_secret'])))
{
    
$twitterEnabled false;
    switch (
$vbulletin->options['ms_vbtwitter_forums'])
    {
        case 
1// include selected forums
            
$forums explode(","$vbulletin->options['ms_vbtwitter_enabled_forums']);
            
$twitterEnabled = (in_array($foruminfo['forumid'], $forums)) ? true false;
            unset(
$forums);
            break;
        case 
2// exclude selected forums
            
$forums explode(","$vbulletin->options['ms_vbtwitter_enabled_forums']);
            
$twitterEnabled = (!in_array($foruminfo['forumid'], $forums)) ? true false;
            unset(
$forums);
            break;
        default: 
// include all forums
            
$twitterEnabled true;
    }

    if (
$twitterEnabled)
    {
        if (
$vbulletin->options['templateversion'] >= "4.0.0")
        {
            
$hashtag_field '<div class="blockrow"><label for="hashtags" class="full">' $vbphrase['hashtags'] . ':</label>
                <input type="text" class="primary full textbox" name="hashtags" id="hashtags" value="' 
$hashtag_values '" maxlength="' $vbulletin->options['titlemaxchars'] . '" tabindex="1" /></div>';
            
vB_Template::preRegister('newthread',array('hashtag_field' => $hashtag_field));
            
$vbulletin->templatecache['newthread'] = str_replace('$messagearea''$hashtag_field . $messagearea'$vbulletin->templatecache['newthread']);
        }
        else
        {
            
$hashtag_field '<div class="smallfont">' $vbphrase['hashtags'] . ':</div>
                <div><input type="text" class="bginput" name="hashtags" id="hashtags" value="' 
$hashtag_values '" size="40" maxlength="' $vbulletin->options['titlemaxchars'] . '" tabindex="1" /></div>';
            
$search '<!-- / subject field -->';
            
$vbulletin->templatecache['newthread'] = str_replace($search'$hashtag_field . $search'$vbulletin->templatecache['newthread']);
        }
    }
    unset(
$twitterEnabled);



LouiseWilson 04-02-2012 10:06 AM

Hi Mosh
Still a no go when the changes have been made.
Hashtags option is set to : Both User & AdminCP defined has tags.
The AdminCP defined one does show up on twitter when posted however no field on the new thread as yet.

Videx 04-02-2012 11:58 AM

Quote:

Originally Posted by LouiseWilson (Post 2315962)
The AdminCP defined one does show up on twitter when posted however no field on the new thread as yet.

Make sure you're using the default vb style when troubleshooting something like this. And a test login wouldn't hurt.

Now that you've forced me to notice hashtags, I guess I'm going to have to enable them just to see how they work.

L4nti4n 04-02-2012 02:33 PM

Hi Mosh,

I have some kind of hint on how to fix the problem with the special characters.
I'm running a german forum with your tweetposter installed (great plugin, thank you for it :) ), so it's very likely that ? ? or ? is included in the title of a topic. As I was getting sick of tweeting every second post manually, just because one of my Team members forgot about the fact, that special characters don't work, I had a look into the plugin code and guessed, that there might be something wrong with the encoding.

Long story short, all I've done was forcing the encoding of the title to UTF-8 in the "Thread to Twitter" Plugin.

That's how the bit of code looks on my end now:
PHP Code:

 if ((strlen($tweet) + strlen($newpost['title']) + $urlTagLength 140) && (strlen($tweetDots) + $urlTagLength 140))
//some more code here
} else {
            
$tweet .= utf8_encode($newpost['title']) . ' ' $shortURL ' ' $hashtag_values;
        } 

Same thing in the part of the code I left out at that point. It might not be the best solution but it's working fine on my end. Maybe that'll help for any further version or anyone who has the same problem.

Regards,
L4nti4n.

PS: If you don't want the code to be posted like that, just tell me, I'll remove it then.

LouiseWilson 04-02-2012 05:17 PM

Quote:

Originally Posted by Videx (Post 2315984)
Make sure you're using the default vb style when troubleshooting something like this. And a test login wouldn't hurt.

Now that you've forced me to notice hashtags, I guess I'm going to have to enable them just to see how they work.

Videx
Now you must think I'm stupid....... What makes you think I do not use the default VB to de bug all my issues..... Jumping the Gun I think.

and If the mod dev wishes a test login he can pm me.

Mosh 04-08-2012 07:49 AM

Quote:

Originally Posted by LouiseWilson (Post 2316083)
Videx
Now you must think I'm stupid....... What makes you think I do not use the default VB to de bug all my issues..... Jumping the Gun I think.

and If the mod dev wishes a test login he can pm me.

Yes, if you can PM me temp administrator login details, then I will have a look at your installation for you.

Weeds 04-18-2012 11:13 AM

Do i need to put the # every time?

What do i need to do if i want to post

#vb #theme #twitter

do i need , or space?

Mosh 04-18-2012 11:44 AM

Quote:

Originally Posted by Weeds (Post 2321233)
Do i need to put the # every time?

Yes

Quote:

Originally Posted by Weeds (Post 2321233)
What do i need to do if i want to post

#vb #theme #twitter

do i need , or space?

A space, just like you posted.

Weeds 04-18-2012 12:01 PM

I been posting without # all the time :D ok i guess i get more people now reading now

datoneer 05-08-2012 10:05 AM

Question:

I think I have set up everything correctly, the thread and/or post is created with no issues, there are no errors, but nothing is posted to twitter. Help !!!

Answer:

On the Details tab of your Twitter Application (at https://dev.twitter.com), check the following:

Under the OAuth settings section, check Access level is set to Read and write not Read-only
Under the Your access token section, check Access level is set to Read and write not Read-only

This fixed my problem!! Thank you great mod!


All times are GMT. The time now is 03:17 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01761 seconds
  • Memory Usage 1,781KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete