?

Log in

 
 
Flex
Sudden layout problems caused by Voice Post changes

Recently LJ made some changes that allow you to hear Voice Posts from an entry without having to open them in a separate player. Unfortunately, this change has messed up some (though not all) people's layouts.

If you are using Flexible Squares with a theme layer that includes the print_entry function, you may be affected. Please take a look at your theme layer's print_entry function to see if it includes this piece of code:

$e.text

If yes, you need to replace that segment with this:

$e->print_text();

(Thank you to kunzite1 for his work on this issue!)

Making this change may involve moving around some triple quotation marks ("""), so if you get compilation errors when you make the change, try this solution first. Look for this piece of code:

	 	<div class="entry">

                         $e.text """; 		
			
			# Currents

And replace it with this one:

	 	<div class="entry">
		      <div class="entry_text">""";
		            $e->print_text();
		      """</div> """;	
			
			# Currents

If you still can't figure out how to make it work, please comment to this post with the link to your theme layer -- and don't forget to make your layer viewable! Someone will then take a look at your code and help you out.

If your code is already using $e->print_text() to print out your entry text, then your layout will not be messed up by the Voice Post change.

Remember, please don't make a new post if you suspect that your layout problems were triggered by the Voice Post code change. Try the fix above, and if you can't get it to work on your own, leave a comment here instead, so that the community (and other's friendspages) won't be overwhelmed. Posts made before this one are all right. And of course, you're still free to make regular unrelated posts and questions.

Edit 2006-09-27

 
Page 1 of 2
<<[1] [2] >>
( Post a new comment )
 
「雫羅」 dara: Coin Toss -- Kiriyamasashwizzled on March 16th, 2006 07:14 pm (UTC)
Oh, great, I was wondering about this. Thank you very much!
 
 
Yuviyuvi on March 16th, 2006 07:39 pm (UTC)
I tried fixing it, but i got an error. Here is my layer. I am going to keep trying.

Thanks.
 
murklinstestmurklinstest on March 16th, 2006 07:46 pm (UTC)
Your $e.text section looks like this:
	 	<div class="entry">
		      $e.text """;

Try changing it to this (added code in blue):
	 	<div class="entry">""";
		      $e->print_text();
 
(no subject) - yuvi on March 16th, 2006 07:53 pm (UTC)
 
(no subject) - murklinstest on March 16th, 2006 07:56 pm (UTC)
 
(no subject) - benitle on April 24th, 2006 06:40 am (UTC)
 
(no subject) - murklinstest on April 24th, 2006 08:09 am (UTC)
 
(no subject) - sreya on May 15th, 2006 05:27 pm (UTC)
 
(no subject) - murklinstest on May 15th, 2006 05:54 pm (UTC)
 
(no subject) - herowlness on August 22nd, 2006 06:35 am (UTC)
 
(no subject) - s2flexisquared on August 22nd, 2006 07:17 am (UTC)
 
 
ickle sexual tyrantanjenue on March 16th, 2006 08:23 pm (UTC)
Thank you so much for this. :)
 
 
(no subject) - auguris on March 17th, 2006 03:18 am (UTC)
 
 
epiphanyofhope on March 17th, 2006 04:24 am (UTC)
Thank you kunzite1! You are a genius :-D
 
 
Cheryl: McDreamyamericandreamer on March 17th, 2006 04:37 am (UTC)
I'm completely confused when it comes to the whole LJ coding thing. I tried finding the related items to change but didn't. I made my layer visible so I was hoping y'all could help me out since the support staff didn't help me.
 
murklinstestmurklinstest on March 17th, 2006 05:48 am (UTC)
In your code, find the section that looks like the code below:
	# Date, time, subject
			
			var string time = "";
			$time = $time + """ @ """;
			$time = $time + $e.time->time_format("short");
			var string date = "";
		    $date = $date + $e.time->date_format("long_day");
			"""
			<div class="datesubject"><div class="date">""";
				print $e.time->date_format("%%day%%, %%month%% %%dayord%%, %%yyyy%%");
				"$time
		   	</div>";
			"""
			<div class="subject">""";
				if ($e.security != "") 
				{
					$e.security_icon->print();
				}
				"""
				$e.subject  
			</div>
		</div>
		""";
	   		   		
	 	"""
	 	<div class="entry">
		      $e.text """;		
			
			# Currents

Replace the two red lines with these lines:
	 	<div class="entry">""";
		      $e->print_text();

Let me know if that works out!
 
(no subject) - americandreamer on March 17th, 2006 09:30 pm (UTC)
 
(no subject) - murklinstest on March 17th, 2006 11:13 pm (UTC)
 
(no subject) - beckyo on March 18th, 2006 07:59 pm (UTC)
 
(no subject) - murklinstest on March 18th, 2006 08:18 pm (UTC)
 
(no subject) - secretlyevileen on March 28th, 2006 12:53 am (UTC)
 
(no subject) - afuna on March 28th, 2006 01:32 am (UTC)
 
(no subject) - secretlyevileen on March 28th, 2006 01:47 am (UTC)
 
(no subject) - pumpkin_pie_m on April 29th, 2006 04:05 pm (UTC)
 
(no subject) - murklinstest on May 4th, 2006 01:10 am (UTC)
 
 
★Ravenmoonrise on March 17th, 2006 09:15 pm (UTC)
Found out I have this problem too, but I havent a clue how to replace it properly without the errors.. was looking at other people's fixes and mine is slightly different than theirs.

My Theme Layer
 
murklinstestmurklinstest on March 17th, 2006 11:12 pm (UTC)
In your print_entry function, find this section:
<div class="entry_text">

                      $e.text """;  

Change it to this:
<div class="entry_text">""";

                      $e->print_text();  

Tell me it that works. :)

 
(no subject) - moonrise on March 17th, 2006 11:17 pm (UTC)
 
(no subject) - murklinstest on March 17th, 2006 11:30 pm (UTC)
 
 
a nice cup of teasideofzen on March 18th, 2006 08:11 am (UTC)
Okay, that fixed the problem with the VoicePosts, but it brought some more problems. My comments are centered now, and all my entries except the top two are stretched out. Here is my layer.

Any help would be appreciated.
 
murklinstestmurklinstest on March 18th, 2006 03:10 pm (UTC)
I wasn't able to see your layer -- did you make it viewable? Without seeing it, though, I can still say that you somehow lost part of your entry_text div. You need to add in the word "class":
<div class="entry_text">

Does that help?
 
(no subject) - sideofzen on March 18th, 2006 06:36 pm (UTC)
 
(no subject) - murklinstest on March 18th, 2006 08:18 pm (UTC)
 
(no subject) - beadslut on April 19th, 2006 01:03 am (UTC)
 
(no subject) - murklinstest on April 19th, 2006 02:43 am (UTC)
 
(no subject) - beadslut on April 19th, 2006 03:14 am (UTC)
 
(no subject) - murklinstest on April 19th, 2006 03:19 am (UTC)
 
(no subject) - beadslut on April 19th, 2006 03:57 am (UTC)
 
(no subject) - murklinstest on April 19th, 2006 04:59 am (UTC)
 
 
pensive1 on March 18th, 2006 07:01 pm (UTC)
THANK. YOU.

*makes you yummy pasta*
 
 
Ick bein ien nerdshikishi on March 18th, 2006 07:15 pm (UTC)
I have checked and my layer has the correct wording - $e->print_text() - but it is still not working. I am not sure what might be causing this unless I am looking in the wrong place?

layer found here
 
murklinstestmurklinstest on March 18th, 2006 08:20 pm (UTC)
Oops, I can't see your layer -- did you make it viewable?
 
(no subject) - shikishi on March 18th, 2006 08:23 pm (UTC)
 
(no subject) - murklinstest on March 18th, 2006 08:29 pm (UTC)
 
 
Stormy: happy endingstormymouse on March 19th, 2006 09:53 pm (UTC)
thank you, thank you, thank you! this worked wonders!
 
 
Kristin: jake_23carbyville on March 21st, 2006 03:50 am (UTC)
Alright.. I must be retarded because I can't get anything to work. Here is my layer.
 
murklinstestmurklinstest on March 21st, 2006 07:36 pm (UTC)
Find this section of code in your print_entry function:
      <div class="entry_text">
        $e.text
      </div>

Change it to this:
      <div class="entry_text">""";
        $e->print_text();
      """</div>

Does that work?
 
(no subject) - carbyville on March 22nd, 2006 01:26 am (UTC)
 
(no subject) - murklinstest on March 22nd, 2006 01:56 am (UTC)
 
(no subject) - kasche on April 20th, 2006 10:23 am (UTC)
 
(no subject) - murklinstest on April 20th, 2006 03:09 pm (UTC)
 
 
I'm a put on a show kind of girlgo_fetch on March 21st, 2006 04:06 am (UTC)
hi there!
i'm so glad i'm not the only one having problems here... do you think you can help me out? here's my layer: http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=6165367
i followed those directions, but i get a compilation error when i change it. i guess i have to move around the quotation marks, but i have no idea how. any idea? :)
 
murklinstestmurklinstest on March 21st, 2006 07:39 pm (UTC)
Try changing this line:
<div class="entry">$e.text</div>

To:
<div class="entry">"""; $e->print_text(); """</div>

Did that do the trick?
 
(no subject) - go_fetch on March 22nd, 2006 01:43 am (UTC)
 
(no subject) - murklinstest on March 22nd, 2006 01:56 am (UTC)
 
 
a fiction worthy wind: Box Check - WWquietdiscerning on April 1st, 2006 08:19 am (UTC)
ive tried this a lot of times, it never works right, it may fix the problem but it makes a mess of the rest of the layout. i know most of the codes i have are all messy and jumbles, since i dont fully understand everthing, but i'd like to figure this out at least, since its annoying to put the person who does the voicepost on a the kill list until there are enough posts for it to be on the second page.

so any help would be much appreciated.

my layer: http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=5000448

i also have a summary scroll on a theme layer, does you need that link too?
 
shiny happy glowyafuna on April 2nd, 2006 03:31 am (UTC)
Eh? I have no idea how that extra text got there. Let me do this again.

Try this. Change

	 		"""<div class="entry">
		      $e.text """;

to:

	 		"""<div class="entry">""";
		      $e->print_text();
			




Also, it would be a good idea to move all functions to your theme layer because you'll lose the non-setcommands when you use the Customization Wizard :)
 
(no subject) - quietdiscerning on April 2nd, 2006 04:13 am (UTC)
 
(no subject) - afuna on April 2nd, 2006 04:19 am (UTC)
 
(no subject) - quietdiscerning on April 2nd, 2006 04:20 am (UTC)
 
(no subject) - s2flexisquared on April 2nd, 2006 04:23 am (UTC)
 
(no subject) - quietdiscerning on April 2nd, 2006 04:27 am (UTC)
 
(no subject) - s2flexisquared on April 2nd, 2006 04:33 am (UTC)
 
 
the sun is a lightbulbalightbulbsun on April 18th, 2006 02:03 am (UTC)
Awesome! You guys are amazing. :)
 
 
Unsealed mime: SGA - Ronon headdeskpoulpette on April 21st, 2006 10:55 pm (UTC)
Ok I've tried to fix the problem on my own using this entry and kunzite1's entry but I can't figure this out as it seems :(
Sorry to bug you but could you please give me a hand?

My theme layer is here and I suspect the culprit is the smiley code I'm planning to use. Any help will be greatly appreciated :D
 
murklinstestmurklinstest on April 22nd, 2006 10:27 pm (UTC)
In print_entry, replace the """$text"""; line with this:
if ($e.text_must_print_trusted) {
   $e->print_text();
}
else {
  """$text""";
}


In EntryPage::print_comment, replace these lines:
"""
<div class="commentreply">$text</div>""";


with this:
if ($comment.text_must_print_trusted) {
   """<div class="commentreply">"""; $comment->print_text(); """</div>""";
}
else {
  """<div class="commentreply">$text</div>""";
}

Basically, if a voice post is detected, or something else in the entry that the system has decided should be printed at the "trusted" level, your smilies code won't take effect and the system will print the entry, but if the entry can be printed untrusted, then the smilies get inserted.

Um, this code is untested. I may have made some typos/mistakes -- hope not!
 
(no subject) - poulpette on April 23rd, 2006 03:59 pm (UTC)
 
(no subject) - murklinstest on April 23rd, 2006 05:47 pm (UTC)
 
(no subject) - poulpette on April 23rd, 2006 07:19 pm (UTC)
 
(no subject) - murklinstest on April 23rd, 2006 07:40 pm (UTC)
 
(no subject) - poulpette on April 23rd, 2006 07:44 pm (UTC)
 
(no subject) - murklinstest on April 23rd, 2006 07:49 pm (UTC)
 
 
ningengirai on May 1st, 2006 02:23 am (UTC)
"""
<div class="entry">
<div class="entry_text">$e.text</div> """;

# Currents

______________________________________

The above code is as it appears in my layout. I've tried every combination under the sun, with and without the quotation marks, but I still get compilation errors. Can someone help me, please?
 
ningengirai on May 1st, 2006 02:30 am (UTC)
Okay, hang on -

I'm using a core layout I made myself from codes for Flexible Squares, plus a hand-coded theme layer. I did manage to compile the new code for the theme layer, but the core layout keeps giving me problems. However, the theme layer is what's responsible for formatting the text output, no? If I successfully managed to replace the old $e.text with $e->print_text(); in the theme layer, do I still have to change the revelant code in the core layout, too, or would that be redundant?
 
(no subject) - afuna on May 1st, 2006 07:45 am (UTC)
 
(no subject) - ningengirai on May 1st, 2006 02:53 pm (UTC)
 
(no subject) - afuna on May 1st, 2006 05:41 pm (UTC)
 
(no subject) - ningengirai on May 1st, 2006 05:49 pm (UTC)
 
(no subject) - afuna on May 1st, 2006 05:50 pm (UTC)
 
 
Duet: Puppy dog eyesduet_chan on May 16th, 2006 05:32 pm (UTC)
I've been trying to fix 'the phone post problem' in my layout since I found out that my layout needed the fix and I'm having some problems.
I used the fix described in the post and comments to fix the phone post problems and haven't had any compiling errors there. But now I have a compiling error poping up for a piece of code just below that code dealing with comments. I'm not sure what I did and thus how to fix it.
My code compiled fine before I put the phone post fix in (I always make sure it compiles before I change anything so I know it works the original way)so I don't know if I may have entered something wrong this time or if it was something I may have done earlier that was effected by this.

My layer:
http://www.livejournal.com/customize/advanced/layeredit.bml?id=5478809

Thank you.
 
Duetduet_chan on May 16th, 2006 05:37 pm (UTC)
Ack. This is what I get for trying to do this on my break at work.
Correct link.
http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=5478809
 
(no subject) - snakeling on May 16th, 2006 05:42 pm (UTC)
 
(no subject) - duet_chan on May 16th, 2006 06:52 pm (UTC)
 
 
Lizzyvanya on May 18th, 2006 10:03 am (UTC)
I'm trying to get this to work for a friend, but can't get it to.

theme layer here: http://www.livejournal.com/customize/advanced/layeredit.bml?id=6563483
 
Lizzyvanya on May 18th, 2006 10:06 am (UTC)
 
(no subject) - afuna on May 18th, 2006 10:55 am (UTC)
 
(no subject) - vanya on May 18th, 2006 11:03 am (UTC)
 
(no subject) - afuna on May 18th, 2006 11:11 am (UTC)
 
(no subject) - vanya on May 18th, 2006 12:41 pm (UTC)
 
(no subject) - afuna on May 18th, 2006 05:54 pm (UTC)
 
 
hope springs a kernel: fling!//popcorn=loveoh_mumble on May 18th, 2006 02:50 pm (UTC)
I'm changing the code, but getting compilation errors.

URL for the layer is http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=5455051

Thanks!
 
shiny happy glowyafuna on May 19th, 2006 06:13 pm (UTC)
Replace

"""
<div class="entry">
$e.text """;


With:
"""
<div class="entry"><div class="entry_text">""";
$e->print_text();
"</div>";


Added in an extra div as it's useful for when you want to format just the entry text, but you can take it out if need be :)



 
(no subject) - oh_mumble on May 20th, 2006 11:28 pm (UTC)
 
(no subject) - afuna on May 21st, 2006 07:22 am (UTC)
 
 
edible seaweed: And that problem is snakes. ON A PLANEsemisphere on May 21st, 2006 03:32 pm (UTC)
Eeps, hope someone still checks this thread
Layer!

My layout doesn't use either codes. Rather, it looks like this:

<div class="entry">
<div class="entry_text"></div>
""";


I've tried adding both of them, but they just merge all of my entries into one giant text. Anyone know how to get around this?
 
shiny happy glowyafuna on May 22nd, 2006 04:11 pm (UTC)
Re: Eeps, hope someone still checks this thread
Posts made by Flex all have comments enabled, plus mods monitor the community's recent_comments.bml, so chances are, you'll get a reply when you comment on posts like this :) Eventually

You actually do have $e.text (otherwise, none of your entry text would show up). However, they are below the metadata (Currents) section.

First, remove this line:
 <div class="entry_text"></div>


Then scroll down a bit and look for this line:

 println $e.text;


Replace that line with these lines:

"""<div class="entry_text">""";
$e->print_text();
"</div>";


That should fix your voicepost-related problems. The entry_text div is there in case you ever need to format just the entry text instead of everything else :)
 
 
 
Lady Bexodustrollsttroll on May 30th, 2006 10:58 pm (UTC)
I'm having an issue with this as well. I tried following the directions in this post and it kept giving me a compile error.
 
shiny happy glowyafuna on May 31st, 2006 01:16 am (UTC)
Heya :) Make your theme layer viewable, give us the link here, and someone will get back to you.
 
(no subject) - trollsttroll on May 31st, 2006 01:18 am (UTC)
 
 
~ c a v a l a x i s ~: cruciatus is iecavalaxis on June 8th, 2006 06:40 pm (UTC)
Thank you guys so much for your hard work. I had this fix working once and I've made changes to the layout, and I can't for the life of me get it to work again.

Here's my layout source.

I can't believe LJ hasn't fixed this yet. I'm so glad I have a community like you guys to turn to. Thanks again.
 
shiny happy glowyafuna on June 11th, 2006 12:03 pm (UTC)
Hey, sorry it took so long.

Look for this block of code:
	   		
	 	"""
	 	<div class="entry">
		      $e.text """; 


Replace that with this:
	   		
	 	"""
	 	<div class="entry">""";
		      $e->print_text();


I believe that the problem has been fixed in system layers. However, since you've overridden print_entry, it uses your copy not the updated/fixed one in the system, so you have to fix it yourself :)

One more thing, I noticed that you have your customizations in your user layer. It's generally a good idea to non-set commands (functions such as print_entry and the like) in your theme layer. Otherwise, if you use the customization wizard, your customizations (the ones that aren't set commands) will be erased.

 
(no subject) - cavalaxis on June 13th, 2006 08:11 pm (UTC)
 
(no subject) - afuna on June 18th, 2006 02:26 pm (UTC)
 
(no subject) - cavalaxis on June 18th, 2006 05:16 pm (UTC)
 
(no subject) - afuna on June 19th, 2006 10:25 am (UTC)
 
 
Catharine Emma Hershey: Wilson Smilechershey on June 18th, 2006 10:45 pm (UTC)
OMG thank you so very much! My LJ is happy again!
 
 
books and libretti: Hilda salutingbookslibretti on July 19th, 2006 02:50 pm (UTC)
Beautiful! I hardly ever use phoneposts, so when I did, I was surprised to notice my layout screwed up. I came here and voilà -- the perfect solution, easily implemented, in no time. Thanks so much.