Skip to:
Content

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#656 closed defect (fixed)

Add new topic

Reported by: fel64 Owned by: mdawaffe
Milestone: Priority: low
Severity: minor Version:
Component: Front-end Keywords: kakumei, template
Cc:

Description

frontpage.php (at revision 841) should see the final </div> on line 76 moved up to before line 71; otherwise a div will be closed that does not exist if a new topic is being created.

Attachments (1)

kakumeitabbed.zip (15.3 KB) - added by fel64 7 years ago.
kakumei + whitespace

Download all attachments as: .zip

Change History (6)

comment:1 ganzua7 years ago

WARNING!!!!!! new error!

I've just realized that after moving that div and when the user logouts the front page is messed.

I moved the div to the former place and front page displays ok again.

So;

  • div in former place + logged out user = front-page ok but add new link not working
  • div above <?php endif; else : $forums ?> + logged in user = add new link working but frontpage messed. :(

comment:2 fel647 years ago

Ganzua reports that this is now working for him:

</div> <!-- moved here -->
<?php if ( bb_is_user_logged_in() ) : ?>
<div id="viewdiv">

Also see the original topic: http://bbpress.org/forums/topic/1242

I'd be happy to clean up the kakumei files entirely (use curly braces instead of if : endif; and add whitespace) to make readability, maintainability and theme creation easier if that sounds good.

comment:3 mdawaffe7 years ago

  • Owner set to mdawaffe
  • Status changed from new to assigned

Readability improvements are cool. Please stick to if :, endif; for files with lots of markup in them (such as templates), though. They seem to be more clear to novice template hackers and no less clear to anyone else.

It's part of the super official, take no prisoners bbPress coding style :)

comment:4 mdawaffe7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [842]) more clarity in conditionals, markup fix. Props ganzua, fel64. Fixes #656

fel647 years ago

kakumei + whitespace

comment:5 fel647 years ago

So there's the same files with a bunch of whitespace added.

If : etc. is less clear to me. I find it horrible to use now, although that may be because my utility deals with braces nicely (highlights them, lets you jump to the sisterbrace etc). But yeah, I didn't change it.

I think at some point there was an </ol> that should have been inside a conditional codeblock, but apart from that and breaking up some php statements into seperate <?php ... ?> blocks for better readability I didn't change anything.

Note: See TracTickets for help on using tickets.