DIY Themes Forums  

Go Back   DIY Themes Forums > Thesis Theme > Thesis Feature Requests
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 08-13-2008, 07:21 AM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

Have you modified that file at all, sparrowhawk? The reason I ask is that the ABBR HTML tag that wraps the date is missing from your code.

If you paste the entire contents of the file here in [php] tags or at our paste bin, I'll make sure you get the correct code to edit to add in an edit link.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #22 (permalink)  
Old 08-13-2008, 09:25 AM
Senior Member
 
Join Date: Apr 2008
Posts: 172
Default

Rick just absolutely ROCKS!!!

Now that I've sucked up just a tad (though my statement is quite true), what would it take to put a similar function into the comments? I rarely edit a comment, but the occasional spam does slip through and it's easier to nuke it via an "edit" link in the comment as opposed to going in through the dashboard.

I'm assuming something goes somewhere in the comment_functions.php file.

I'd even hazard a guess it goes somewhere in here:

Code:
<p class="to_comments"><span class="bracket">{</span> <a href="<?php the_permalink() ?>#comments" rel="nofollow"><?php comments_number(__('<span>0</span> comments', 'thesis'), __('<span>1</span> comment', 'thesis'), __('<span>%</span> comments', 'thesis')); ?></a> <span class="bracket">}</span></p>
But trying to figure out WHAT and exactly where in there it goes sounds like an invitation to blow up the blog....
__________________
Jay Thompson

Thesis Sites:
Phoenix Real Estate Guy
Phoenix Real Estate Search
Reply With Quote
  #23 (permalink)  
Old 08-13-2008, 10:20 AM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

This doesn't include any styling, but since only logged in users with the right to edit comments will see it, styling doesn't seem too important.

Anyway, in comments.php, find this:

Code:
<strong><?php comment_author_link(); ?> </strong><span class="comment_time"><?php comment_date('m.d.y'); ?> at <?php comment_time(); ?></span>
Afterwards, on the same line, add this:

Code:
<?php edit_comment_link('Edit', '<span class="edit_comment"> | ', '</span>'); ?>
The " | Edit" bit that is added to comments can be styled by referencing this in custom.css:

Code:
.custom .edit_comment { }
And thank you for the kind words, Jay.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #24 (permalink)  
Old 08-13-2008, 07:51 PM
Junior Member
 
Join Date: Aug 2008
Posts: 11
Default

Quote:
Originally Posted by kingdomgeek View Post
Have you modified that file at all, sparrowhawk? The reason I ask is that the ABBR HTML tag that wraps the date is missing from your code.

If you paste the entire contents of the file here in [php] tags or at our paste bin, I'll make sure you get the correct code to edit to add in an edit link.
Hi kingdomgeek,

PHP Code:
post_name) return ' ' $post->post_name; } function thesis_byline_and_date() { if (thesis_show_byline()) { if (is_page()) { $author thesis_get_option('show_author_on_pages'); $date thesis_get_option('show_date_on_pages'); } else { $author thesis_get_option('show_author'); $date thesis_get_option('show_date'); } } if ($author || $date) { ?>

' . __('by', 'thesis') . ' ' . get_the_author() . ''; if ($author && $date) echo ' ' . __('on', 'thesis') . ' '; if ($date) echo '' . get_the_time('F j, Y') . ''; ?>
max_num_pages; $current_page = get_query_var('paged'); if ($total_pages > 1) { echo '
' . "\n"; if ($current_page <= 1) { echo '

'; if (is_search()) next_posts_link('← ' . __('Older Results', 'thesis')); else next_posts_link('← ' . __('Older Entries', 'thesis')); echo "
\n"; } elseif ($current_page < $total_pages) { echo '

'; if (is_search()) next_posts_link('← ' . __('Older Results', 'thesis')); else next_posts_link('← ' . __('Older Entries', 'thesis')); echo "
\n"; echo '

'; if (is_search()) previous_posts_link(__('Newer Results', 'thesis') . ' →'); else previous_posts_link(__('Newer Entries', 'thesis') . ' →'); echo "
\n"; } elseif ($current_page >= $total_pages) { echo '

'; if (is_search()) previous_posts_link(__('Newer Results', 'thesis') . ' →'); else previous_posts_link(__('Newer Entries', 'thesis') . ' →'); echo "
\n"; } echo "
\n\n"; } } 
I agree with phoenixreguy, you rock.
Reply With Quote
  #25 (permalink)  
Old 08-14-2008, 02:24 AM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

Okay, replace this bit of code:

Code:
get_the_time('F j, Y') . ''; ?>
with this one:

Code:
get_the_time('F j, Y') . ''; edit_post_link('Edit', ' | '); ?>
That should work for ya.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!

Last edited by kingdomgeek : 08-14-2008 at 07:32 PM. Reason: code fix
Reply With Quote
  #26 (permalink)  
Old 08-14-2008, 05:28 AM
Junior Member
 
Join Date: Aug 2008
Posts: 11
Default

Oops I did the edit and received:
Parse error: syntax error, unexpected '<' in /homepages/13/d176864820/htdocs/blog/wp-content/themes/thesis/lib/functions/content_functions.php on line 48



I put the original back and now I will sit on my hands.
Reply With Quote
  #27 (permalink)  
Old 08-14-2008, 07:33 PM
Senior Member
 
Join Date: Jul 2008
Location: Connersville, IN
Posts: 2,244
Send a message via ICQ to kingdomgeek Send a message via AIM to kingdomgeek Send a message via MSN to kingdomgeek Send a message via Yahoo to kingdomgeek
Default

Maybe I should sit on my hands! I fixed the code in the above post for you; I left out "?>" in the line that you needed to copy in. Should work fine now.
__________________
Rick Beckman, Kingdom Geek & Thesis Support Ninja (Forums Moderator)
[ Thesis Manual | Help, my posts don't show up! ]


Amazon Wishlist | My custom.css
Get Thesis! | Earn Cash as a DIY Affiliate!
Reply With Quote
  #28 (permalink)  
Old 08-15-2008, 12:54 PM
Member
 
Join Date: Aug 2008
Posts: 54
Default

Quote:
Originally Posted by kingdomgeek View Post
Okay, got you folks an answer.

In lib/functions/content_functions.php, find this bit of code:

Code:
<p class="author_and_date"><?php if ($author) echo '<em>' . __('by', 'thesis') . '</em> <span class="author">' . get_the_author() . '</span>'; if ($author && $date) echo ' <em>' . __('on', 'thesis') . '</em> '; if ($date) echo '<abbr class="published" title="' . get_the_time('Y-m-d') . '">' . get_the_time('F j, Y') . '</abbr>'; ?></p>
Swap it out for this:

Code:
<p class="author_and_date"><?php if ($author) echo '<em>' . __('by', 'thesis') . '</em> <span class="author">' . get_the_author() . '</span>'; if ($author && $date) echo ' <em>' . __('on', 'thesis') . '</em> '; if ($date) echo '<abbr class="published" title="' . get_the_time('Y-m-d') . '">' . get_the_time('F j, Y') . '</abbr>'; edit_post_link('Edit', ' | '); ?></p>
Works nice enough, I think I'll leave the change on my blog.
Rick,

Thank you, it works fine on my blog!
Reply With Quote
  #29 (permalink)  
Old 08-15-2008, 08:27 PM
Junior Member
 
Join Date: Aug 2008
Posts: 11
Default

Quote:
Originally Posted by kingdomgeek View Post
Maybe I should sit on my hands! I fixed the code in the above post for you; I left out "?>" in the line that you needed to copy in. Should work fine now.
Works perfectly, thanks for all the help you give!
Reply With Quote
  #30 (permalink)  
Old 09-12-2008, 03:20 PM
Junior Member
 
Join Date: Aug 2008
Posts: 24
Default adding admin EDIT link to posts

Prior to updating today to Thesis 1.1, I used the code below from kingdomgeek and it worked perfectly.

Quote:
Originally Posted by kingdomgeek View Post

in lib/functions/content_functions.php ...

Code:
<p class="author_and_date"><?php if ($author) echo '<em>' . __('by', 'thesis') . '</em> <span class="author">' . get_the_author() . '</span>'; if ($author && $date) echo ' <em>' . __('on', 'thesis') . '</em> '; if ($date) echo '<abbr class="published" title="' . get_the_time('Y-m-d') . '">' . get_the_time('F j, Y') . '</abbr>'; edit_post_link('Edit', ' | '); ?></p>
Then I updated to 1.1 and put the same code in lib/functions/content_functions.php. That's when I got a bunch of errors beginning with "Cannot modify header information - headers already sent by ..." So I put in a clean copy of the content_functions.php file and it works fine now (no errors) but without the ability to edit posts.

I'm wondering if there is a new code that I have to use to get the edit posts functionality back. Thanks!
__________________
Julie Vieira, IHM
www.ANunsLife.org
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:56 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0