Search Results for 'code'
-
AuthorSearch Results
-
April 20, 2007 at 12:28 pm #57086
In reply to: please help to fix the “style-rtl.css”
talgalili
MemberTrent – I see you have fixed the problem. Thank you very much !
I will now go to build the forum, and will share with all of you once I made it work (and also, will share my Hebrew translation to the rest of the community)
Again, Trent, thank you very much

p.s: one small correction I made to the stylesheet, was to the header.
In the current configuration, The first letter of the name of the forums, is cut off.
So to fix it, I erased the line:
font-style: italic;
from the file style.css, in the “#header h1 { ” section, as seen here:
In style.css:
#header h1 {
font-family: Georgia;
/*font-style: italic;*/ <– this line
position: absolute;
display: block;
color: #444;
text-align: right;
letter-spacing: -1px;
right: 59px;
bottom: 31px;
}
I don’t know how to incorporate it into the trunk or to post a ticket, but I hope what I write will help…
Another small issue (which matters little to me, but is worth noting) :
When the mouse hovers around a header of (for example a forum name): in Firefox, you get the whole line to change color(as it should). in IE you deon’t get that effect.
Tal.
April 19, 2007 at 9:12 pm #1774Sjon
MemberHope this is the right place. I just installed the latest svn version on my local pc, and got the forementioned error twice (also with topic_slug field). Running mysql 5.0.
Patch:
Index: upgrade-schema.php
===================================================================
--- upgrade-schema.php (revision 805)
+++ upgrade-schema.php (working copy)
@@ -4,7 +4,7 @@
$bb_queries = "CREATE TABLE $bbdb->forums (
forum_id int(10) NOT NULL auto_increment,
forum_name varchar(150) NOT NULL default '',
- forum_slug text NOT NULL default '',
+ forum_slug text NOT NULL,
forum_desc text NOT NULL,
forum_parent int(10) NOT NULL default '0',
forum_order int(10) NOT NULL default '0',
@@ -31,7 +31,7 @@
CREATE TABLE $bbdb->topics (
topic_id bigint(20) NOT NULL auto_increment,
topic_title varchar(100) NOT NULL default '',
- topic_slug text NOT NULL default '',
+ topic_slug text NOT NULL,
topic_poster bigint(20) NOT NULL default '0',
topic_poster_name varchar(40) NOT NULL default 'Anonymous',
topic_last_poster bigint(20) NOT NULL default '0',Regards,
April 19, 2007 at 5:24 pm #57060In reply to: Plugin: bbPortal 1.2
citizenkeith
Participantkeith:
you mean like a read more?
Yes, that’s what I mean.
April 19, 2007 at 2:37 pm #57057In reply to: Plugin: bbPortal 1.2
citizenkeith
ParticipantThanks Null.

One additional thought… is it possible to limit the length of the post on the portal page, then have a link at the bottom that will take you to the full post in the forum?
April 19, 2007 at 1:11 pm #57055In reply to: Plugin: bbPortal 1.2
citizenkeith
ParticipantThanks Null! We’re using bbPortal at our forum now.
Any chance that you can add Sticky support for topics? I have a topic stickied in my designated portal forum, but it doesn’t appear stickied on the portal page.
April 19, 2007 at 11:54 am #57052In reply to: Plugin: bbPortal 1.2
Null
MemberDo you also run php 5? and/or mysql 4?
and can you check if the bb_menu table is created in your db and if there is stuff in it?
To be honest, I have realy NO idea why you guys have these errors or why they occurs. Since you both have the same problem with the same lines of code, I am guessing that OR i programmed something wrong (that can be, cause I really am a programming noob) or it is a php/msql version problem.
Do you see the menu tabs in the admin area?
If you dont realy need the menu part, but want to play/use the portal only, you can create a clean php file naming it bbmenu.php and put in a function called: get_bbmenu(). Just make sure this function does nothing at all. Upload it to your plugin directory and you can use the portal plugin. The portal plugin checks if this functions excist in order to continue, but in this stage it doesn’t realy need the bbmenu plugin yet (it is usable without it). Only thing is you won’t have a nice menu on your portal page then…
April 19, 2007 at 6:46 am #57049In reply to: Plugin: bbPortal 1.2
Null
MemberPerhaps cause it’s php 5? I dunno it seems to have problems with:
$r = mysql_query("SELECT * FROM$bbdb->menuWHEREset= 'active' ORDER BYorder` ASC”);while($rw = mysql_fetch_array($r))`
You can see the tabs in the admin erea? (is your bb_menu table filled?)
edit:
perhaps add:
global $bbdb;right above the code (above the$r) I showed… what happens then?April 19, 2007 at 12:49 am #55537In reply to: Hooks & Filters Docu
Sam Bauers
ParticipantYes, we could set up a wiki – but to avoid (most of) the stated problem it would have to be a technical/developers wiki for now. We should also agree to move it’s contents to any official wiki when it comes along. I assume that an official wiki would use the same software as codex.wordpress.org which appears to be mediawiki, so to be compatible when the time comes we would have to use that too. My personal thought is that it is about time for this, and as the development community grows it is becoming necessary. I could set one up in half an hour (I’d be happy to host it – ad free). And we could work out the taxonomy of it here.
To be slightly democratic, I say if ten people who we recognise as regulars/developers vote for it here, then we should go ahead. I’m also willing to hear arguments against the idea too.
Should we vote on it?
April 18, 2007 at 10:26 pm #55075In reply to: Fix bbPress Plugin 0.8.1-1
fel64
MemberTo make the fix work, thierry, you have to change the field to
0and save with the plugin applied. It doesn’t automatically unmark them I think.April 18, 2007 at 8:49 pm #55074In reply to: Fix bbPress Plugin 0.8.1-1
thierryyyyyyy
ParticipantActually, I said something wrong. New posts I wrote are now considered as bozo. I feel that as soon as a user is considered as bozo, all his posts (and also pasts posts) should be marked as bozo, no ?
It seems that mdawaffe has lot to do on other projects. No correction after 1 mounth of bug submission, we feel abandonned.
I used this SQL query to mark all my bozoed posts (from the poster who have id=1, which is usualy the keymaster) to “normal” post :
UPDATE bb_posts
SET post_status=0
WHERE post_status=2 and poster_id=1my posts after this “update” has not been bozoed. My profile page still shows a “1”.
April 18, 2007 at 5:57 pm #1769Topic: Adding wordpress posts to bbpress profile?
in forum Troubleshootingsmurfdude
MemberWhen i was using author.php for my wordpress profile i used the following code to show the latest blog posts i had made
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- ” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”>
<?php the_title(); ?>
Posted @ <?php the_time(‘d M Y’); ?><?php endwhile; else: ?>
<?php _e(‘Well well, it looks as if this user has no posts. Nevermind!’); ?>
<?php endif; ?>
This doesn’t work in my bbpress profile, even though i have the 2 integrated. Any ideas of how i could get it to work?
April 18, 2007 at 5:28 pm #55535In reply to: Hooks & Filters Docu
Null
MemberIt’s out of our hands, come sit with us, silent demonstration
April 18, 2007 at 7:47 am #56690In reply to: Plugin: Avatar Upload
Sam Bauers
ParticipantI have found that there are many more mime-types out there. Heres a list of extension to mime-type associations that you might want to add. I have built up this list over the last few years of real world use of applications.
'png' => 'image/png'
'png' => 'image/x-png'
'png' => 'application/png'
'png' => 'application/x-png'
'jpg' => 'image/jpeg'
'jpg' => 'image/jpg'
'jpg' => 'image/jp_'
'jpg' => 'image/pjpeg'
'jpg' => 'image/pjpg'
'jpg' => 'image/pipeg'
'jpg' => 'application/jpg'
'jpg' => 'application/x-jpg'
'jpeg' => 'image/jpeg'
'jpeg' => 'image/jpg'
'jpeg' => 'image/jp_'
'jpeg' => 'image/pjpeg'
'jpeg' => 'image/pjpg'
'jpeg' => 'image/pipeg'
'jpeg' => 'application/jpg'
'jpeg' => 'application/x-jpg'
'gif' => 'image/gif'
'gif' => 'image/gi_'.
Of course, you would have to adapt your code to handle multiple mime types for each extension like so (or similar)…
Line 31:
$allowed_types = array(
'gif' => array(
'gif' => 'image/gif',
'gif' => 'image/gi_'
),
'jpg' => array(
'image/jpeg',
'image/jpg',
'image/jp_',
'image/pjpeg',
'image/pjpg',
'image/pipeg',
'application/jpg',
'application/x-jpg'
),
'png' => array(
'image/png',
'image/x-png',
'application/png',
'application/x-png'
)
);
$allowed_types['jpeg'] = $allowed_types['jpg'];.
Line 124:
if ($error == 0 && (!in_array($img_type, $allowed_types[$img_ext]) || !in_array($img_ext, $allowed_extns)) ) {.
Then remove the next conditional block from line 130 to line 134 because that check is now covered in the previous conditional block.
April 17, 2007 at 6:17 pm #56689In reply to: Plugin: Avatar Upload
fel64
MemberNow if only there was a way to display a default image if the user hasn’t uploaded one.
That’s the point of the identicon jobbie, it assigns everyone a unique and easily distinguishable image when they sign up.

Louisedade,
bb_initis called beforebb_headI think. In your avatar.php template file it should also beclass="bbcrumb"rather thanid="breadcrumb", at least if you want the same styling as everything else.April 17, 2007 at 5:20 pm #56686In reply to: Plugin: Avatar Upload
smurfdude
MemberW00t! I’ve figured out how to display the avatar next to comments in wordpress. Though the way I have done it i’m worried it’s going to cause problems.
Now if only there was a way to display a default image if the user hasn’t uploaded one. Not that it’s a big deal. Thanks
April 17, 2007 at 3:30 pm #57026In reply to: Hyperlinks are showing as plain text
Null
MemberPlz do cause it doesn’t only effect hyperlinks, but also some hooks wich need to generate links. This one is not working for me:
<?php new_topic(); ?>It should show a link: Add to ad a new topic, but it won’t show…Excample: http://www.bbportal.org
April 17, 2007 at 3:25 pm #56685In reply to: Plugin: Avatar Upload
LMD
Participant@Trent and ardentfrost: Thank you!
Trent, feel free to use the upload code for whatever! I stole it from myself anyway… it is adapted from a photo gallery application I wrote.
My previous message hinted at expanding the number of images that can be uploaded, although I only mean it within the context of multiple avatars. But somebody else is welcome to expand the code to a general image/file uploader.
April 17, 2007 at 3:13 pm #56684In reply to: Plugin: Avatar Upload
LMD
ParticipantOk, I’ve now looked at the code and can see how it can be included without needing to branch the plugin too much (and all the maintenance issues involved with that!).
First of all I removed the identicon functions from the
bb-avatar-upload.phpfile and placed them at the bottom of theidenticon.phpfile, to keep them all together.Secondly, I moved the
if($_POST['identicon']){...}code from theavatar-upload.phpfile to the bottom ofidenticon.phpand made it a function called by the ‘bb_head’ hook (I might eventually do this for the main upload functions too). Note: Is there a pre-head hook that fires before any headers are sent?function useidenticon()
{
global $user;
//fel identicon
if( $_POST['identicon'] )
{
felapplyidenticon( $user->ID );
}
}
add_action( 'bb_head', 'useidenticon' );You then only need to supply and maintain two files for the “branch”.
- my-plugins/identicon.php
- my-templates/avatar.phpThe
avatar.phptemplate is the least likely file to change (it’s been modified slightly since version 0.1).I’ve made the modifications and zipped them up for you to examine:
Identar Modified (this is minus my files, except the template file)
You will also need the updated version of Avatar Upload: Avatar Upload (version 0.2)
By keeping the Identicon and Avatar parts of the code separate, it should be easier to use Subversion to merge in – or simply replace – changes I make to the trunk code.
Regarding filename storage in the database – there are two reasons for this. The first is that I prefer to store the image dimensions along with the current avatar. The maximum width and height of the avatar is just that, maximums; the actual dimensions could be any size and any aspect ratio within that limit. I then include the height and width attributes in the <img> tag – it’s good practise because the browser makes space for the image when loading the page, instead of shifting everything after the page has loaded.
The second reason is more exciting – future proofing. A future version of this plugin will allow multiple file uploads, allowing users to upload more than one avatar image and select which one to use.
Since releasing version 0.1 of the plugin, I have reduced the number of DB calls in the profile pages and in the
avatar-upload.phpfile by making use of the$userobject and calling$user->avatar_filewhen I need to access the avatar info.Although, when adding avatars to a user’s posts you still have to do a DB query. If I used your suggested method, it is still going to involve at least one call to the DB, either to get the
user_loginfrom theget_post_author_id()(and then grab the avatar file), or to get the avatar itself from theget_post_author_id().April 17, 2007 at 1:33 pm #49619In reply to: Emoticons For bbPress?
smurfdude
MemberI used this plugin and the row of smilies show beneath the edit form, but they are unclickable. An even when I just type in
etc, they don’t appear in the post.
April 17, 2007 at 12:54 pm #56683In reply to: Plugin: Avatar Upload
smurfdude
MemberAh i was hoping it would be something simple like inserting a bit of code in the comments page rather than needing a plugin to call stuff from the database. Being rubbish at php that kind of thing just confuses me, so will have to cross my fingers that someone else does it
April 17, 2007 at 11:07 am #55531In reply to: Hooks & Filters Docu
Trent Adams
MemberFair enough

Trent
April 17, 2007 at 10:58 am #56947In reply to: Latest Topics for NonWP Site
Trent Adams
MemberSorry, wrong syntax, but it does work with:
https://bbpress.org/forums/rss/
fel64, you must think I am crazy today eh as I can’t seem to get anything straight the first time!!

Trent
April 17, 2007 at 8:50 am #57040In reply to: bbPress themes / templates directory, does it exist?
Calitoe
MemberI have visited your site, Trent, and I do appreciate the effort, but some of the ones listed don’t work with my installation. The “four” themes that I mentioned in my first post that worked for me were all taken from your site!
I guess now I have a strong reason to develop another skill: “bbPress themes”

Thanks for your answers.
April 17, 2007 at 12:36 am #55529In reply to: Hooks & Filters Docu
fel64
MemberIt’s not actually meant to be instructions, more like a list of hooks and filters Trent. I just included that as an aside for someone starting out.
I’m sure you two have seen some more filters or hooks yourself, so help out and add them please. The point is, rather than waiting around for documentation, start getting some makeshift documentation up ourselves.
post_textis a filter called on the text leaving the database I think, it’s what the emoticons use.April 17, 2007 at 12:27 am #56677In reply to: Plugin: Avatar Upload
fel64
MemberStrange – what is the error?
Besides, the code should be this instead I think!
href="<?php bb_get_option( 'uri' ); ?>/avatar-upload.php?id=<?php echo $user->ID; ?>"Small error in the documentation. If you’re feeling lazy, feel free to hard-code your forum’s URL in instead.
- ” rel=”bookmark” title=”Permanent Link: <?php the_title(); ?>”>
-
AuthorSearch Results