My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 2: [Request] Styling posts from plugin "Twitter Tools" differently?
1 person starred this issue and may be notified of changes. Back to list
Status:  Started
Owner:  safirul.alredha
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by balaji.dutt, Oct 11, 2007
I'm using Alex King's Twitter Tools plugin to cross-post my tweets on
Twitter into the linkblog.

The cross-posts are linked to a particular category, and under Theme
Options I've set that category as the "Chat" type post.

What I've noticed is that somewhere inside the code for 'chat' in
app\display\post.php, the first character is taken to be the name of the
person. That isn't true for the tweet cross-post  and thus it makes the
post look a bit odd. I know this is a bit of an edge-case, but any
suggestions on how to workaround this would be most welcome!

I also noticed an odd bug - sometimes the second character disappears in
the styling between the first char and the rest of the line. It's a little
hard to explain, so do take a look at the attached screenshot.
Twitter-Tools-Chat-Style-Post.png
11.2 KB   View   Download
Comment 1 by safirul.alredha, Oct 12, 2007
It seems that you found a bug from the code that I adapt from. Plus it seems that -ve
php explode limit doesn't work PHP < 5.1.

FYI, the chat format should be like in the Chat example. 
John: Hello!
Doe: Hi...

But it should be more versatile than that. 
Status: Started
Comment 2 by balaji.dutt, Oct 12, 2007
The swallowed character could possibly be arising from the fact that the foreach loop
is incremeting the position by +1 twice...

first here : $content = strpos($line, ": ") + 1;
and then again here :  $blockquote = substr($line, $content + 1, strlen($line));

Yup, I did see the example, and from looking through the code I realize it's
searching for the : character as the keyword to split the text. The tweet cross post
will almost never take that format, so I was able to arrive at a compromise (visually
atleast). 

The tweets are now consolidated into a daily digest format and the category format is
set as "quote". The resulting entry is a bulleted list with each line getting a
linkback via Twitter Tool and the post itself getting a permalink URL (which works
well in RSS).

Comment 4 by safirul.alredha, Oct 13, 2007
(No comment was entered for this change.)
Owner: safirul.alredha
Comment 5 by safirul.alredha, Oct 13, 2007
For the first problem, replace your current /app/includes/tumblelog.php with the
attached file.
tumblelog.php
12.3 KB   Download
Comment 6 by safirul.alredha, Oct 13, 2007
You might wanna replace this too:

styles/fold/style.css

	div.chat ul li blockquote {
		margin-top: 0;
		margin-bottom: 0;
		}
Comment 7 by balaji.dutt, Oct 14, 2007
Hm, like I said earlier, my edge-case of wanting to post twitter tweets as chat
doesn't work with the code. But I can live with that.

Interestingly, earlier there used to be an option under the Write Menu for "Chat".
that seems to have disappeared now - regression?
Comment 8 by safirul.alredha, Oct 14, 2007
I think it's best for you to digest the twitt meaning combine all twitt for the day
in 1 single post. Or if you could draw or sketch how you wanted it to be I might find
a solution for you.

The tab menu for chat only appear if you set / define a category for Chat from Theme
Options.
Sign in to add a comment

Hosted by Google Code