Search Results for 'code'
-
AuthorSearch Results
-
March 20, 2009 at 9:54 pm #72588
In reply to: Multiple Templates Simultaniously!
_ck_
ParticipantMy theme switcher plugin is capable of doing this quite easily, it already allows each visitor to select the theme they want.
All you would need to do is change the cookie support code into session support code so the server controls which theme is seen instead of the visitor.
Should take all of an hour to convert for someone who understands cookies and sessions.
Actually if the domain is fixed you can just use
$_SERVER['HTTP_HOST']
or$_SERVER['SERVER_NAME']
to determine the theme to use which makes it even easier.March 20, 2009 at 9:47 pm #72356In reply to: Bulgarian translation
wiseacre
MemberЧе аз така и направих – с текстовия редактор. Замених навсякъде тоя текст с празен. Може и да има друг по-хубав начин ама не го зная.
Сега ще се мъча да инсталирам и уча KBabel примерно
.
March 20, 2009 at 7:54 pm #72524In reply to: Overwriting Template functions
Ipstenu (Mika Epstein)
ModeratorStupid question – Don’t you have to
remove_filter('filter_i_want_to_replace')
first?March 20, 2009 at 7:14 pm #72578In reply to: What’s the state of WordPress theme integration?
Postmatic
MemberHey Kevin,
I need to do all 3. I have that database, user table, and cookies all nicely set up… but am trying to figure out the best way to tackle the theme.
Thanks a lot for the code. I’ll try it out on Monday. Ya, I too hope we get an answer on that bug soon. Maybe something will move on it over the weekend.
Fingers crossed,
Jason
March 20, 2009 at 6:27 pm #72355In reply to: Bulgarian translation
Ivaylo Draganov
MemberМежду другото, в .po файла мисля, че ще е добре навсякъде трябва да се махне онова
хахах, да
трябва да се зачистят пътищата но нямам идея как да стане освен направо да бръкна в .po файла с текстов редактор.
March 20, 2009 at 6:23 pm #72354In reply to: Bulgarian translation
wiseacre
MemberПредстава нямам. Попаднах на превода ти търсейки точно същата информация. Ще трябва да питаме.
Между другото, в .po файла мисля, че ще е добре навсякъде да се махне онова
“E:my-documentsprojectscomicsbistro_software”
Не, че пречи кой знае колко – и с него и без него успях да направя другия файл ма стои някак … не много стилно.
March 20, 2009 at 6:00 pm #72566In reply to: How to get the link to the second post?
Null
MemberI know, that’s why I ask it here
The forum has to know some way what topics belong to him and in what order, so there must be a way to get it…. the only questions is: how???
March 20, 2009 at 5:49 pm #72577In reply to: What’s the state of WordPress theme integration?
kevinjohngallagher
MemberRather than using the crazy structure of BBpress’s header.php file – actually while i’m on that can i ask why BBpress DID NOT use the same div nesting as WP so that integration was simple? madness – if you use this one, your BBpress forum should automatically look 90% like it’s in your WordPress page if you use the default theme, default K2 or sandbox.
You will have to tweak bits of course, this isn’t fool proof, but in terms of the basics, it makes life alot easier.
I mentioned these changes back in October, so i’m used to the copying and pasting of them now as it doesn’t look like making thing easy for the end user is part of the goal here; hence the plugin. I too hope we get an answer on the bug soon
March 20, 2009 at 5:45 pm #72353In reply to: Bulgarian translation
Ivaylo Draganov
MemberБлагодаря
Когато излезе бета версия на 1.0 ще обновя и превода, засега остава на стабилната 0.9
Колкото до конкретните преводи на някои думички – за нашите нужди звучи приемливо добре
Променили сме и още някои нещица – сещам се за “Стил” вместо “Тема”(Theme), защото Topic също се превежда като “Тема” и става объркване. Макар, че сега влиза в разрез с превода на WordPress… може би трябва да стане “Тема”(Theme) и “Дискусия”(Topic)
Може би трябва да се произнесе някой от комисията по стандартизация
(Н.Бачийски?)
А знаеш ли какъв да подновим превода в официалното хранилище с този?
March 20, 2009 at 5:45 pm #72576In reply to: What’s the state of WordPress theme integration?
kevinjohngallagher
MemberHi Vernal,
In terms of integration in a software sense, you have to answer yourself this:
1) Do they need to look the same?
2) Do I need shared login ?
3) Do i need shared wordpress functions (menu, sidebar, otehr cool wordpress stuff) ?
If you answered yes to 1) and no to 2) and 3) you only need to make your style sheets and HTML look similar and dont need any integration.
If you answered yes to 1) and 2) and no to 3) then you should be able to use the latest alpha and latest wordpress and all should be fine. Personally, i’d not ouch with with a bargepole and i’d use BBpress 0.9 and WP 2.7.1 with _ck_’s Freshly Baked Cookies plugin (link coming up in a bit).
If you answered yes to 1) 2) and 3) then you need to use Ann’s plugin (again link coming up).
In terms of fixing your BBpress to integrate into your wordpress theme easily, that one is simple. Replace the code in your header.php file with this:
<body id="<?php bb_location(); ?>">
<div id="page">
<div id="wrapper">
<div id="header">
<div id="headerimg">
<h1 id="blog-title"><!-- PUT YOUR WP LINK HERE --></h1>
<div id="blog-description">
<div class="description">
<!-- PUT YOUR WP DESCRIPTION HERE -->
</div> <!-- #description -->
</div> <!-- #blog-description -->
</div> <!-- #headerimg -->
<!--
K2 USERS
THIS IS WHERE YOU PUT YOUR MENU CODE
-->
</div>
<div id="access">
<div class="skip-link"><a href="#content" title="Skip to content">Skip to content</a></div>
<div id="menu">
<!--
SANDBOX USERS:
THIS IS WHERE YOU PUT YOUR MENU CODE
-->
</div>
</div><!-- #access -->
<div id="container">
<div id="primary">
<div id="current-content">
<div id="content">
<div id="post">
<div id="main">
<h1><a>"><?php bb_option('name'); ?></a></h1>
<?php if ( bb_get_option('description') ) : ?><p class="description"><?php bb_option('description'); ?>
<?php endif; ?>
<?php login_form(); ?>
<?php if ( is_bb_profile() ) profile_menu(); ?>March 20, 2009 at 8:53 am #72574In reply to: What’s the state of WordPress theme integration?
kevinjohngallagher
MemberHi Chris,
I’ve actually made a plugin that makes theme integration between BBpress and WordPress an absolute breeze (one click!), but it used to require one of my customized baseline theme’s.
Last week I converted it to work with any standard BBpress installation but alas hit some bugs in the BBpress core. I have posted about them, but have had no reply yet. You can find the post here: https://bbpress.org/forums/topic/overwriting-template-functions
Basically all of my original customized themes have a far more usable div nesting in the header and footer, so that it matched 3 of the most common wordpress theme’s (standard, sandboz, K2); thus anyone loading up an integrated BBpress would see their own website styling/menus etc. While not 100% accurate, it saved me a great deal of time when customising.
But then last week i converted this into a much better plugin. It reads the directory of the wordpress theme you are using and automatically outputs the WordPress theme’s header and footer files with the necessary BBpress code injected. It effectively encapsulates your BBpress forum inside wordpress pages for seemlesss moving around (basically like simpleforums).
But the whole thing’s on pause until we can get answer to https://bbpress.org/forums/topic/overwriting-template-functions . On a side note, as someone who is attempting to build plugins for BBpress, getting answers to questions like these to help development is really difficult, and the standard answer of “read other plugins that’s how i learnt” really doesn’t help when you come up against something new. Maybe we should have a plugin developer section (as the current plugin section has become a request section)?
March 20, 2009 at 5:20 am #67170Billy Wilcosky
ParticipantI’m confused though. I thought that IE8 automatically renders pages like IE7 unless you tell it to behave better with a meta tag. At least that is what this article says:
Version targeting in IE 8, and an alternative path for Microsoft
So why is a code needed to tell IE8 to act like IE7, when supposedly it already does this?
I’m still researching and just not learning about IE8 so maybe I’m reading the above article wrong.
March 19, 2009 at 11:34 pm #72564In reply to: How to get the link to the second post?
Null
MemberWell it’s a comment link and, at the moment, linking to the last post. I want to change this to link it to the second post since that is the first real comment. I want, from a specified forum, the links of every second post (first real reply) of every topic in that specified forum.
Current code:
<?php printf(__('<a href="%1$s">Comments (%2$s)</a>'), get_topic_last_post_link(), get_topic_posts()) ?></div>
So
get_topic_last_post_link(),
should be change to the link the second # is generating now…Like
get_topic_first_reply_link()
or something…Thanks
March 19, 2009 at 10:55 pm #72563In reply to: How to get the link to the second post?
Ipstenu (Mika Epstein)
ModeratorAssuming that by ‘sec post’ you mean the second post.
Just the second post of any topic or a specific topic or … What’s the significance of the second post? What’s your plugin supposed to do? I’m asking because it’s easier to help someone if you actually know what they’re trying to do.
If all you want is a plugin that lists links to the second post of every topic, that’s different than say, one that lists the second post of topics about cabbages. They look similar, but they aren’t always
March 19, 2009 at 9:43 pm #67169Null
MemberThere is also a offical MS code you can put in your header that IE8 can read and it will automaticly render as IE7 when it’s in. I only can’t remember what that code was
But to be honest, these are dirty fixes. Since IE8 is more ‘web standard compatible’ then IE6 or 7 we should update the CSS files with the next release (and hopefully get rid of those: if IE then… code)
March 19, 2009 at 9:19 pm #67168_ck_
ParticipantFor those that don’t want to install IE8 permanently to just test their sites, this version will run in it’s own virtual box so it doesn’t affect the rest of your system:
March 19, 2009 at 7:39 pm #72352In reply to: Bulgarian translation
wiseacre
MemberДобра работа
Пробвах го на trunk – засега изглежда супер
Само това “Вписване” и “Отписване” ми звучи странно … Може хората да го разберат като “Регистрация” и “Изтриване на регистрация” … при мен поне това е първосигналната реакция …
March 19, 2009 at 3:13 pm #59343In reply to: Adding a new User Type
steveg190
MemberI’ve tried using fel64’s method above but I’m not able to make it work at all, so I thought I would try something different. Since he mentioned using the
$bb_roles->add_role()
that already exists infunctions.bb-capabilites.php
I thought I could work with that. Bascially, I want to put my own additions and modified base roles (aside from admin and keymaster, obviously) into a plugin that replaces the existing roles function. I’ve sucessfuly done this via a dirty hack of the core file but I’d really love to migrate my changes to a plugin.Is it not possible to just do bascially a copy-paste of the
bb_init_roles
function fromfunctions.bb-capabilites.php
, rename it, make new roles and modify existing ones, then use something likeadd_filter('init_roles','my_bb_init_roles')
to hook it toinit_roles
? Obviously I’m a complete noob to this since my attempts are completely failing and what I know is just scraped together from looking at other plugins and some limited reading on making WordPress plugins. Any assistance here would be greatly appreciated.March 19, 2009 at 12:26 pm #72308tema5
MemberNow I got an extra headache, my WP widget column disappeared.
I’m switching back waiting suggestions.
update: sorry, it was a wicked weather widget blockng sidebar, not PHP5 extention, but bbpress install problem remains
March 19, 2009 at 12:08 pm #72307tema5
MemberI’m with godaddy.com
It uses php 4.x by default, but supports PHP5 for .php5 files.
I changes handle of .php files to PHP5 too.
But I got the same error. What to do?
threk
Memberha ha
Interesting forum, isn’t it?
중국어 테스트였군요.
행운이 함께하시길…
March 19, 2009 at 12:47 am #72421In reply to: Can’t be logged into BOTH WP and BB (trunk)
Ipstenu (Mika Epstein)
ModeratorFixed.
Changed
<?php if ( $avatar = bb_get_avatar( bb_get_current_user_info( 'name' ), $size = '50' ) ) : ?>
<div style="float:right;"><?php echo $avatar; ?></div>
<?php unset($avatar); endif; ?>to
<?php if ( $avatar = bb_get_avatar( bb_get_current_user_info( 'id' ), $size = '50' ) ) : ?>
<div style="float:right;"><?php echo $avatar; ?></div>
<?php unset($avatar); endif; ?>March 18, 2009 at 8:49 pm #72420In reply to: Can’t be logged into BOTH WP and BB (trunk)
Ipstenu (Mika Epstein)
ModeratorThis issue is fixed with trunk as of … er now?
Side error is my old hack to fetch the gravatar on the front page is borked, but that’s okay
March 18, 2009 at 2:11 pm #72522In reply to: Overwriting Template functions
kevinjohngallagher
MemberSo 7 hours later and i can’t find a solution to this.
The weird thing is that ‘some’ functions can be overwritten with filters or added to with actions but others are refusing to play ball. Here’s the code that i have:
//works
add_action(‘post_ip_link’, ‘output_what_i_want’);
add_action(‘topic_pages’, ‘output_what_i_want’);
// does not work
add_action(‘post_form’,’output_what_i_want’);
add_action(‘bb_post_header’,’output_what_i_want’);
add_action(‘bb_get_footer’, ‘output_what_i_want’);
When that code runs, the first 2 add_actions’s run fine, but the bottom 3 don’t. For some reason i can’t overwrite those functions.
Now to the filters:
// Working
add_filter(‘post_ip_link’, ‘output_what_i_want, 11’);
add_filter(‘topic_pages’, ‘output_what_i_want, 11’);
add_filter(‘post_form’,’output_what_i_want, 11′);
// Not Working
add_filter(‘bb_post_header’,’output_what_i_want, 11′);
add_filter(‘bb_get_footer’, ‘output_what_i_want, 11’);
This is where it’s a bit weird, as POST_FORM can be added to via a filter (great), but can not be overwritten. BB_POST_HEADER and BB_POST_FOOT cant seem to overwritten or added to via a filter.
So in the short term, i’m looking for a solution to overwriting the BB_POST_HEADER and BB_POST_FOOT functions. I’ve a plugin that’s stalled due to it.
Moving on from there though, i think this is something we need to look at and maybe get some documentation/information posted about somewhere. Because as far as i can tell there are only a few options here:
1) My code is wrong
2) Some functions cannot be overwritten
3) Some functions cannot be added to with an action
4) There’s a bug at play.
Any help would be really appreciated.
March 18, 2009 at 10:14 am #71392deadlyhifi
Participantthe latest bleeding edge release (from subversion) adds paging to the ‘Latest Discussions’. But if any of the arguments are used in ‘get_latest_topics’ the paging doesn’t work.
from functions.bb-topics.php
function get_latest_topics( $args = null ) {
$defaults = array( 'forum' => false, 'page' => 1, 'exclude' => false, 'number' => false );so I’ve tried it with
$topics = get_latest_topics('forum=-3');
and
$topics = get_latest_topics('exclude=3');
both have same results but no paging.
-
AuthorSearch Results