1. Create a new theme layer. (Follow the steps in this post to create a theme layer.) If you have already created a theme layer for the style, just add the following code to it.
No worries, everyone has to start somewhere. First of all, if you haven't already done so, go read the tutorial on creating layers
Copy and paste the entire function containing the code you want to edit -- in this case, it would probably be best to use the code in the entry above since it contains a bugfix that hasn't gone live on the site yet. A function would be the function header, function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor) { ... } and everything in between the braces.
If you want to try your hand at editing other functions, you should go get the source code for Flexible Squares, over here. Then use the "Download" link ( "View as HTML" works as well, I think, but I usually just use "Download")
Ok, I'm following you so far. I've already created the layer and copied the code n the post above.
My problem is: where does the code for the perm link go? Do I have to copy the whole comment code you posted above and then replace """"""; (after #3) with it?
Because I couldn't find the # comment bit in the main code above...
Is there a way to change the link text on the Friends view? I am trying to get it to say "Add" instead of "Mem." Also, is there a way to add the Edit and Link links to the friends view? Thanks so much ^^
Try the "Text to add an entry to the memories" option under the "Text" tab in the wizard, if you want to change it in all views. If only in the friends view, well, I guess there should be a way to do that, but I can't quite think of how to do it. (I'm not entirely sure it could be done either, actually.) Maybe you should post the question to the community? :)
Got it. Check to see whether you have any unclosed sets of triple quotation marks ("""). There should be no code for programming logic ( if-statements, function headers, etc) that are in between """ and """; If you copied and pasted the entire function from the tutorial, the problem might be in some of the previous code.
Comments 155
Thanks
Reply
The code to create a permanent link is
print """ Link""";
Replace the text in read with your desired link text :)
As for where to put it within the layer, that depends on where you want it to show up.
# Comments
"""
""";
var Link edit;
var Link mem;
if ($p.view != "entry" or $p.view != "reply")
{
$edit = $e->get_link("edit_entry");
$mem = $e->get_link("mem_add");
#1
if (defined $edit )
{
print """ $*text_edit | """;
}
print """ $*text_memories""";
#2
if ($p.view != "entry" or $p.view != "reply")
{
$e.comments->print();
}
elseif ($e.comments.enabled)
{
$e.comments->print_postlink();
}
else
{
" ";
}
#3
"""""";If you want to insert the permalink before the edit/memory links, then replace #1 with the permalink code ( ... )
Reply
sorry for asking all these questions, but I'm only just starting to experiment with tweaking styles to fit my own needs...
Reply
Copy and paste the entire function containing the code you want to edit -- in this case, it would probably be best to use the code in the entry above since it contains a bugfix that hasn't gone live on the site yet. A function would be the function header,
function print_entry(Page p, Entry e, Color bgcolor, Color fgcolor)
{
...
}
and everything in between the braces.
If you want to try your hand at editing other functions, you should go get the source code for Flexible Squares, over here. Then use the "Download" link ( "View as HTML" works as well, I think, but I usually just use "Download")
For future reference, go to http://www.livejournal.com/customize/advanced and explore a bit ;)
Reply
My problem is: where does the code for the perm link go? Do I have to copy the whole comment code you posted above and then replace """"""; (after #3) with it?
Because I couldn't find the # comment bit in the main code above...
Reply
Reply
Reply
Try the "Text to add an entry to the memories" option under the "Text" tab in the wizard, if you want to change it in all views. If only in the friends view, well, I guess there should be a way to do that, but I can't quite think of how to do it. (I'm not entirely sure it could be done either, actually.) Maybe you should post the question to the community? :)
Reply
Reply
A cap of the error, if it helps.
Reply
If you copied and pasted the entire function from the tutorial, the problem might be in some of the previous code.
Reply
Reply
Glad to be of service. (Nice icon, by the way!)
Reply
Leave a comment