• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Wordpress Dynamic Theme - WPXenCSS

If you are using Dragonfly's DXF skin:

Go into your Wordpress Style.css editor and

Find:
Code:
/*
Theme Name: WPXenCSS
Theme URI: http://www.snlponline.net/
Description: Xenforo Theme for Wordpress based off of twentyten theme
Author: Richard Berrill, SNLP
Version: 0.1
*/

div.news_item p {
    padding-bottom: 10px;
    padding-top: 10px;

}

Add Under
Code:
/* =XeniqueStyle
-------------------------------------------------------------- */

.forumNodeInfo {
    margin-right: 10px;
    margin-left: 10px;

}

/* =XeniqueImages
-------------------------------------------------------------- */

.pageContent img {
    margin: 0;
    height: auto;
    width: auto;
}
.pageContent .attachment img {
    max-width: 900px;
}
.pageContent .alignleft,
.pageContent img.alignleft {
    display: inline;
    float: left;
    margin-right: 10px;
    margin-top: 4px;
}
.pageContent .alignright,
.pageContent img.alignright {
    display: inline;
    float: right;
    margin-left: 10px;
    margin-top: 4px;
}
.pageContent .aligncenter,
.pageContent img.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.pageContent img.alignleft,
.pageContent img.alignright,
.pageContent img.aligncenter {
    margin-bottom: 12px;
}
.pageContent .wp-caption {
    background: #f1f1f1;
    line-height: 18px;
    margin-bottom: 20px;
    padding: 4px;
    text-align: center;
}
.pageContent .wp-caption img {
    margin: 5px 5px 0;
}
.pageContent .wp-caption p.wp-caption-text {
    color: #888;
    font-size: 12px;
    margin: 5px;
}
.pageContent .wp-smiley {
    margin: 0;
}
.pageContent .gallery {
    margin: 0 auto 18px;
}
.pageContent .gallery .gallery-item {
    float: left;
    margin-top: 0;
    text-align: center;
    width: 33%;
}
.pageContent .gallery img {
    border: 2px solid #cfcfcf;
}
.pageContent .gallery .gallery-caption {
    color: #888;
    font-size: 12px;
    margin: 0 0 12px;
}
.pageContent .gallery dl {
    margin: 0;
}
.pageContent .gallery img {
    border: 10px solid #f1f1f1;
}
.pageContent .gallery br+br {
    display: none;
}
.pageContent .attachment img { /* single attachment images should be centered */
    display: block;
    margin: 0 auto;
}

1.webp 2.webp
 
How would we add additional Primary links in the Navbar to match any addons we install from Xenforo?
 
How would we add additional Primary links in the Navbar to match any addons we install from Xenforo?

footer.php around line 54 you should find the end of the menu, simply a case of adding additional items as needed.

Great work bambua :)

The only thing i've changed is to edit the urls (eg from index.php?help/terms to /help/terms) to make the homepage links consistent with my forum.

I've noticed the contact form won't display when you click the footer link (doesn't seem work on my site, or your demo or any links i've tried in this thread)
As a temporary solution i've removed
Code:
 class="OverlayTrigger"
so it opens the link as a new page. It'd be nice if it could open as an overlay though, any suggestions?
 
I'd literally just finished playing with the footer before I read your post so they were fresh in my mind, I wouldn't have first thought that's where they would be either :P

One more tiny thing i've noticed in footer.php
Code:
<li><a href="/..<?php echo $WPXC_xenforo_path; ?>/index.php#navigation">Top</a></li>
I got rid of /..<?php echo $WPXC_xenforo_path; ?>/index.php instead of taking you to the top of the page it takes you to the forum.

I like how it fetches your forum avatar in the blog comments, it'd be cool if it could display your gravatar too in a future update if you haven't uploaded an avatar to the forum :)
 
The login panel not closing is almost always because a second copy of jquery is being loaded in Wordpress, I'd check your page and see if another addon on wordpress is causing that. The next previous pages portion is coming in the updated I'm working on today.

I'm using WP3.1 with XF-RC3 and have the problem with the most recent XF-Bridge. If I disable the XF Bridge, I can close the login... :S

Edit: Hmm.. if I remove line 556 in functions_widgets.php
add_action('wp_head', 'xf_widgets_load_stuff');
in the xenforo plugin, it works.
 
Actually I am, I've been in the hospital for the last 2 weeks :/ I'm just getting out tonight. Been really sick, look for some updates on this next week as I get things rolling again.
 
Actually I am, I've been in the hospital for the last 2 weeks :/ I'm just getting out tonight. Been really sick, look for some updates on this next week as I get things rolling again.

Really great! I would also donate for it. BTW: I fixed the bridge for myself using this change in function_widget.php (line 543):
Code:
function xf_widgets_load_stuff() {
    $path = rtrim(get_option('home'), '/') . '/wp-content/plugins/xenforo/';

    wp_register_style('jquery-ui-core', $path . 'css/ui.core.css');
    wp_register_style('jquery-ui-tabs', $path . 'css/ui.tabs.css');
    wp_register_style('xf-widget', $path . 'css/xf-widget.css');
    wp_print_styles('jquery-ui-core');
    wp_print_styles('jquery-ui-tabs');
    wp_print_styles('xf-widget');
    wp_deregister_script('jquery');
    wp_register_script('jquery', rtrim(get_option('home'), '/') . '/wp-content/plugins/xenforo/js/dummy-jquery.js');
    wp_enqueue_script('jquery');
    wp_print_scripts('jquery-ui-core');
    wp_print_scripts('jquery-ui-tabs');
}
add_action('wp_head', 'xf_widgets_load_stuff');
 
  • Like
Reactions: eod
Daniel,

I solved it by adding
Code:
wp_deregister_script('jquery');
to the bottom of header.php in the themes folder.
So
Code:
	<?php
		/* Always have wp_head() just before the closing </head>
		 * tag of your theme, or you will break many plugins, which
		 * generally use this hook to add elements to <head> such
		 * as styles, scripts, and meta tags.
		 */
		wp_deregister_script('jquery');
		wp_head();
	?>

My reason being i've made quite a few customisations to the theme, so when a new version is released i'll have to go through it carefully.
As I haven't touched any of the bridge files, I can simply update that plugin without worrying about losing any modifications.
 
  • Like
Reactions: eod
Actually I am, I've been in the hospital for the last 2 weeks :/ I'm just getting out tonight. Been really sick, look for some updates on this next week as I get things rolling again.
Welcome back mate, hope you feel better now :)
 
Anything new regarding this? It's actually one hell of a theme, it works perfectly for me. I would love to see it developed some more. :)
 
Anything new regarding this? It's actually one hell of a theme, it works perfectly for me. I would love to see it developed some more. :)
Actually yes, I've got it working so that it pulls the avatars correctly as well as a WIP of pulling the navbar straight from XenForo so that you don't have to set it up manually.

It all depends on how much work I can get done for my full time job this week and how fast I can get it out. Working 50 hours a week+ as an IT consultant right now doesn't leave as much time for my forum hobby ;)

You can see the WIP in the link in my footer. I'll also be putting in some of the changes posted in the thread here as well so that it works better on other sites/themes.
 
I'm interested in how you fixed the avatar display issue, does it support users who have a gravatar that isn't hosted locally now too?

I got mine working for local avatars by changing
Code:
function getAvatar($userId,$size) {
		$avatar_path = "../forum/data/avatars/" . $size . "/0/" . ($userId-2) . ".jpg";
		if(file_exists($avatar_path)) {
		}
	return $avatar_path;
}

But no idea if that's the right way, I just played around until I could make them display!
 
I actually just tapped in to the XF info programatically to get the user ID...let me spend a little time on it today and it should get gravatar's working as well before I re release it.
 
Top Bottom