Search Results for 'code'
-
AuthorSearch Results
-
July 31, 2007 at 12:28 pm #59609
In reply to: AdityaNaik.com
fel64
MemberI like it
How’d you achieve this level of bb integration? Are you includeing bbP or have you written a bunch of functions to emulate all that?July 31, 2007 at 11:05 am #59603In reply to: Is bb_enqueue_script really needed?
Null
MemberWell eeuuhh, first I would have to know which part uses prototype and where that code is.
And then I would have to learn to code properly

Any1 know if it is even planned to switch interly to jQuery? It would save some useless script loading
(and I would have to rewrite my bbMenu plugin, but I was planning to do that anyway)
July 31, 2007 at 10:42 am #59602In reply to: Is bb_enqueue_script really needed?
fel64
MemberjQuery is there but not everything uses jQuery yet. You could speed things along by rewriting the prototype code for jQuery if you like.
July 31, 2007 at 8:56 am #59356In reply to: mysql_query() OR $bbdb->get_results() ?
Null
Member@ MaryJane download and use phpMyAdmin. It gives you acces to you database. You still need to know how to make/use SQL queries though

@Box, dude had any time to help me out with the bbMenu plugin thingy? I want to fix this issue before I start with the next version (using jquery and fixing alot of bugs)
Thx
July 31, 2007 at 8:51 am #59607In reply to: AdityaNaik.com
Null
MemberLooks horribly in ie6
(only have ie6 at work
)
July 31, 2007 at 7:35 am #59593In reply to: Limit long words
beaver6813
MemberAhhh that auto worked a treat
I’ve used the break-word as well for IE so it doesn’t even need to scroll when words are too long, in FF it just scrolls. Although a plugin to shorten long url’s words etc might be quite cool, like:http://www.ilovebbpress.com/bla/blab/blalblba/indexnop/123
to
http://www.ilovebbpress.com/bla…/123
If I get time next week I might make one… but don’t quote me on that

Thanks guys for the help!
July 31, 2007 at 6:50 am #59598In reply to: Is bb_enqueue_script really needed?
_ck_
ParticipantIt adds the (half-dozen) ajax scripts to topic pages.
Doesn’t affect other pages from what I can see.
In theory it’s very necessary, can’t delete topics without it since there is no non-ajax fallback from what I can see. Also things like adding/removing favorites within a topic.
You can reduce mysql queries by pre-loading all options in one fetch at startup. Try this un-documented option in config.php
$bb->load_options = true;personally I can’t wait ’til they stop using prototype.js since it’s HUGE for the few functions they access
then there is add-load-event which is 200 or so bytes but not combined with any other script so it forces yet another external file load
July 31, 2007 at 6:24 am #59581In reply to: How to evaluate server speed?
_ck_
ParticipantLooks like they are really trying to hide “load” from you.
I know of only two ways to grab it from php (there might be more?)
echo "method 1: ".file_get_contents('/proc/loadavg');
echo "method 2: ".shell_exec("uptime");Really though, should not be this hard.
It’s possible to get better getting hosting for $150/year.
July 31, 2007 at 6:19 am #59580In reply to: How to evaluate server speed?
_ck_
ParticipantI should point out that even your static.html serves up fairly slowly, though a little faster than the dynamic pages. Getting mysql caching may not be as big a boost as it hopefully should be. I can’t even see what your guaranteed VPS ram is.
If you are on a VPS there is usually a seperate VPS control panel that will also let you restart services, including mysql.
my setup lets me do a “service mysql restart” but that’s probably not universal. This is what I have in my.cnf
[mysqld]
# myisam-recover = BACKUP
# delay-key-write = ALL
max_connections = 400
key_buffer = 16M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 1000
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
tmp_table_size = 16M
skip-innodb
old-passwords = 1
basedir = /var/lib/mysql
datadir = /var/lib/mysql
long_query_time = 1
log-slow-queries = /var/log/mysql/mysql-slow.log
log-error = /var/log/mysql/mysqld.err
[mysqld_safe]
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 32M
sort_buffer = 32M
read_buffer = 16M
write_buffer = 16MJuly 31, 2007 at 1:52 am #50216In reply to: Change Post Order Question
fel64
MemberThe first line of the first post? Or do you mean the first thread in the first thread listing?
Sure, just do something like this. <?php if( !$is_foist_topic ) { echo ‘ class=”first-topic”‘; $is_foist_topic = true; } ?>
The first time it checks it won’t be true, so it echoes code to change the class of the HTML. Then it sets it to true, so the next times it will be true and it’ll skip that.
You want the code to set the class of the tr I believe, so put it in the HTML for that. Play around.
July 31, 2007 at 1:46 am #58872In reply to: Can’t put code between backticks after upgrade
fel64
MemberI mailed mdawaffe in the mailing list but no response. He knows and I assume he’s working on it, or going to.
July 31, 2007 at 12:20 am #52665In reply to: Plugin: [REL] Signature
citizenkeith
ParticipantThanks fel!
In the meantime, I’ll just edit HTML special characters in my user’s signatures.
July 30, 2007 at 11:38 pm #58871In reply to: Can’t put code between backticks after upgrade
outchy
Memberyeah this is happening for me too. any luck?
July 30, 2007 at 10:48 pm #52664In reply to: Plugin: [REL] Signature
fel64
MemberBy having ck stripslashes on it. It seems to be something he’s gotta fix.
None of these are dumb questions … just ask ’em and don’t worry about it.
July 30, 2007 at 10:29 pm #52663In reply to: Plugin: [REL] Signature
citizenkeith
ParticipantThanks guys, I figured it out.

Dumb Question #2: How does one use quotes or apostrophes in their signatures? Forward slashes are inserted before each instance.
July 30, 2007 at 10:22 pm #59590In reply to: Limit long words
fel64
MemberYou want
.post { overflow: auto; }which isn’t actually the automatic setting – but it’s the one that automatically adds a scrollbar if the post is too wide. Like multiline code here, it’ll add the scrollbar only if needed. Also handy for images.
And lol at everyone suggesting something else.
July 30, 2007 at 9:27 pm #52950In reply to: usually forums would have…
chrishajer
ParticipantI think the real question here is “what the heck is a winesap”?
July 30, 2007 at 9:04 pm #59589In reply to: Limit long words
bobbyh
MemberIt sounds like you’re looking for something like the proprietary word-wrap CSS property which works in IE browsers only, as far as I know.
.post {word-wrap: break-word; }July 30, 2007 at 9:00 pm #59576In reply to: How to evaluate server speed?
chrishajer
ParticipantIf you have shell access, I imagine you would have access to
top? My guess is the load on the server is pretty crazy, with lots of sites hosted there.edit: just read where you don’t have
topin your path. Hmm. But you have access to my.cnf? That’s odd.July 30, 2007 at 7:49 pm #59586In reply to: Limit long words
bobbyh
MemberYeah, the easy fix for this is adding:
.post {overflow: hidden; }July 30, 2007 at 7:47 pm #57812In reply to: Theme: Misty for bbPress
MaryJane
MemberI cant get this theme downloaded. All thats in the download link is a text file and its not wrote in english so i dont know what it says.
July 30, 2007 at 5:36 pm #59572In reply to: How to evaluate server speed?
_ck_
ParticipantWell its a P4 (single core) @ 3ghz with 4gb of ram.
The question is how many clients is it hosting, and since you have your own ip, there’s no real way to determine that.
It’s taking almost a full second for 9 queries. Something is very, very, very wrong. You might want to enquire. If you do have access to /etc/my.cnf, you can turn on the mysql query cache and that should cause a radical improvement.
Not related to the mysql speed but just in general, any external javascript that you don’t need to execute immediately on a page, you should add the word DEFER to it. There are two flickr scripts you should try adding it to, if it still works with it in both IE and Firefox, it will make your pages seem a little faster.
ie.
<script DEFER type="text/javascript" ...blah...blahLast but not least if they can’t fix it, you can do better for your almost $150 a year.
July 30, 2007 at 5:20 pm #51582In reply to: Full Content of Most Recent Post on Front-Page?
outchy
Memberyes, good call:
<?php
$latestpost = $bbdb->get_row("
SELECT *
FROM $bbdb->posts
WHERE post_status = 0
ORDER BY post_time DESC
LIMIT 1
");
?>
Re:
<a href="<?php echo get_topic_link($latestpost->topic_id); ?>"><?php echo get_topic_title($latestpost->topic_id); ?></a>:<br /><br />
<a href="<?php user_profile_link($latestpost->poster_id); ?>"><?php echo get_user_name($latestpost->poster_id); ?></a> said:
<?php echo $latestpost->post_text; ?>July 30, 2007 at 4:45 pm #59547In reply to: “My Threads” – User Specific Views
howtogeek
MemberJust thought I’d throw this out there… if you want to put the two new views first in the list, you can first unset the existing view, and then re-set it below where you add the new views.
unset($views);
if (bb_is_user_logged_in()) {
$views = "Topics I've Started";
$views = "Topics I've Participated In";
}
$views = "Topics with no replies";
You can also rename the view that way if you want.
July 30, 2007 at 4:32 pm #52949In reply to: usually forums would have…
riddle
MemberI managed to hack the breadcrumbs code in Kakumei to properly show one level of subforums. I’m not yet a plugin hacker, nor am I sure whether this sort of cosmetic tinkering can be handled by plugins as opposed to editing the themes, but if anybody’s interested I can try to extract enough fragments to help you get started retracing my steps.
-
AuthorSearch Results