Skip to:
Content
Pages
Categories
Search
Top
Bottom

Template File For Single Activity?

  • What template file is used to display the screen you land on when clicking the “view” link on a single entry?

    I have a left and a right sidebar on my site, and would like to add them to this page as well, but can’t seem to figure out which template file it is. I’m fearing that it’s activity/entry.php, in which case, how would I add sidebars to that w/o it messing with how entries display in the listing of activity items?

    Example: http://www.riotcart.com/activity vs. http://www.riotcart.com/members/justbishop/activity/4346

    (I need the 2nd example to also be between the 2 sidebars, not to mention how it screws up the admin bar, so I need to fix that too!)

Viewing 11 replies - 1 through 11 (of 11 total)

  • pcwriter
    Participant

    @pcwriter

    @justbishop

    The “View” links lead to this:
    members/activity/permalink.php


    pcwriter
    Participant

    @pcwriter

    @justbishop

    Sorry, forgot about the sidebar issue :-(

    The easiest way to duplicate the layout of your site pages in permalink.php is to copy page.php and replace the contents in that file with the contents from permalink.php, keeping the container structure and sidebar calls from page.php intact, then rename that new file permalink.php to overwrite the old one. Keep a backup of your original permalink.php in case stuff gets screwed up ;-)


    @mercime
    Keymaster

    @mercime

    Template file – https://buddypress.trac.wordpress.org/browser/tags/1.2.8/bp-themes/bp-default/members/single/activity/permalink.php

    EDIT – pcwriter, didn’t see you there. Bad habit of mine to take phone calls and chatting first before answering forum post :-)


    pcwriter
    Participant

    @pcwriter

    @mercime Thanks for the link…
    @justbishop There’s your backup. :-)

    EDIT: just saw your edit… hi!

    Thanks guys!

    OK, so…took my page.php and inserted the appropriate code that makes permalink.php tick, without disturbing the page.php sidebar/div/footer structure. Everything that uses my page.php template displays perfectly, but this is what I got for my efforts on permalink.php:

    http://www.riotcart.com/members/justbishop/activity/4346

    I’ve been sitting here all morning moving div openings/closings around, adding/deleting divs, fighting the urge to toss my monitor out the window, etc., but I cannot for the life of me get the activity to fill the space between the sidebars! At one point (I forget how), I did have it between them, but the actual activity was squished so narrow that everything was all jumbled up on top of itself and unreadable. Dragonfly (Opera’s version of Firebug) tells me that the activity is surrounded by the “padder” div, which is set to 525 px wide. I tried c&p-ing the entire padder CSS and adjusting ONLY the width, but that pushed the right sidebar down underneath everything else.

    I know it’s more of a CSS issue than a BP issue, but any help/suggestion/direction is appreciated!

    ETA: and why the poop won’t the admin bar go all the way across on this template?!

    Alrighty, after lots of headache, I think i have the activity in between the sidebars and looking OK. Now I just have the admin bar width issue to figure out :/


    @mercime
    Keymaster

    @mercime

    == I think i have the activity in between the sidebars and looking OK. ==

    Confirming that it’s looking good :-)

    == I just have the admin bar width issue to figure out ==

    The adminbar in that permalink page is styled like so in bp-default adminbar.css
    ` body#bp-default.activity-permalink #wp-admin-bar .padder {
    min-width: 960px;
    max-width: 960px;
    }`
    I see you have a fixed width of 1000px for your site. So if you have custom.css listed after the @import of adminbar.css, just add this
    ` body#bp-default.activity-permalink #wp-admin-bar .padder {
    min-width: 1000px;
    max-width: 1000px;
    }`
    but if you use stylesheet listed before @import of adminbar.css, you’d have to add `!important` to your min-width and max-width

    You should also correct the width of the site when in permalink view
    ` body.activity-permalink {
    min-width: 960px;
    max-width: 960px;
    }`
    change to 1000px

    Thanks for the help! Not sure if this was the intent, but tossing your 2nd snippet into my main style.css seems to have done the trick :D


    @mercime
    Keymaster

    @mercime

    Cool. Just checked your permalink page and body is still 960px and not 1000px like other pages in site. Looks like you’d have to add !important to the style like so
    `body.activity-permalink {
    max-width: 1000px !important;
    min-width: 1000px !important;
    }`


    pcwriter
    Participant

    @pcwriter

    @justbishop

    Just checked too. Like @mercime said, adding the !important param to css style rules sometimes helps when you just can’t tighten up the specificity any more.

    If you ever run into a jam where the !important thing just doesn’t cut it, try “weighting” the specificity of the element you’re trying to style. Here’s a simple set of guidelines to help get you started: http://htmldog.com/guides/cssadvanced/specificity/

    Just throwing in my 2ยข :-)

    I appreciate all the cents I can get, thanks guys ;)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Template File For Single Activity?’ is closed to new replies.
Skip to toolbar