Search Results for 'code'
-
AuthorSearch Results
-
August 4, 2007 at 9:39 am #59754
In reply to: plugin: bb-Polls
Null
MemberAnd makes it much lighter/faster. I am game
August 4, 2007 at 9:07 am #59753In reply to: plugin: bb-Polls
_ck_
Participantmazdakam, try this for better translations?
http://ckon.wordpress.com/files/2007/08/bb-polls.txt?v016
I’ve put ALL the text near the top for easier editing.
@Null, I’m not going to spend too much time “ajax-ing” it.
But I think i can make all the actions happen without reloading the page. I’m going to simply replace the contents in the
<div id=poll></div>dynamically. Should be enough to keep everyone happy.August 4, 2007 at 8:20 am #56246In reply to: No ajax on replies
Null
MemberWell made a ticked of this
August 4, 2007 at 8:19 am #59751In reply to: plugin: bb-Polls
_ck_
ParticipantSorry, I have to learn how those translation calls work, never used them before.
I wanted to allow the text changes to be made within the admin menu so no external files have to be edited.
ah, found the instructions:
https://codex.wordpress.org/Localizing_WordPress#Localization_Technology
I’ll have 0.16 up shortly with that changed.
August 4, 2007 at 7:02 am #56245In reply to: No ajax on replies
_ck_
ParticipantOne thing that’s probably holding that back and bugs me in that templates are not re-used in bbpress, is for example how post-form and edit-form should be integrated with maybe one or two conditional statements if necessary.
I guess ajax post deletes are a lot easier than ajax posting/editing.
Then there is the code block in front-page, forum.php & view.php which shows sub-forums, stickeys and posts. It’s virtually identical in each template but if you want to change one, you got to go to all three and change them in each place, the exact same code. It should be a sub-template, which of course I could hack in on my own but should be part of the core. Change it in one place, changes everywhere you see it.
August 4, 2007 at 6:52 am #56421In reply to: Freshness Linked
_ck_
Participant“get_topic_last_post_link()” and it’s dependency “get_post_link()” relies on two important things which can be easily thrown off in bbpress or it’s db
1. if you are using a plugin or other code to change the number of topics shown on the front page or forum pages vs the topic page, get_topic_last_post_link() will calculate the last post incorrectly. This is because there is only one universal setting in bbpress right now for the number of items per page (there should be an array in the core so limit can be different than limit and then get_topic_last_post_link() will know to look at the destination limit instead of where it’s coming from)
see my bug fix for custom limits for each page here:
https://bbpress.org/forums/topic/custom-topics-count-for-different-pages-that-doesnt-break-last-post
it basically forces get_post_link to recalculate
2. get_topic_last_post_link() relies on the post_position in the bbpress table – which can get messed up if there are deleted posts, moved/merged posts, or recounts
Recounts does not attempt to recalculate and resave the post_position. This would have to be written. It basically would have to look at all posts in a topic, sort them by the desired date order, and then renumber them.
August 4, 2007 at 5:42 am #56244In reply to: No ajax on replies
chrishajer
ParticipantLooks like it happened around r406 to address trac ticket 425? (the last place I can find topic-ajax.php is r384):
https://trac.bbpress.org/browser/trunk/bb-admin/admin-ajax.php?rev=406
https://trac.bbpress.org/ticket/141
09/22/06 20:47:15 changed by mdawaffe
* status changed from assigned to closed.
* resolution set to wontfix.
We're not even ajax posting anymore.
Should revisit this if we ever go back.August 4, 2007 at 3:41 am #59747In reply to: plugin: bb-Polls
_ck_
ParticipantActually originally in my code, I was unserializing the data ONCE, then the array is passed globally, already in place. Serializing data is only bad if you are going to be constantly unserializing it in the same bbpress instance. I don’t do that (on purpose).
(update, actually I have to go back and fix the process with that, I did a quick fix around a bug and fetched $topic each time but that needs to be a global also – all the code used to be in one routine so $topic was only fetched once, but that’s changed – I can fix)
I used meta data because that’s what it’s there for. There is no need on a forum to create extra tables for stuff that won’t be used outside bbpress. I look at all the downsides of poll plugins like WP-Polls and tried to avoid them.
The goal was to use bbpress routines wherever possible for future tweaks. As I go back and cleanup bits of code I can already see where and how to make it more ajax-like (though that’s not a priority).
August 3, 2007 at 11:24 pm #59746In reply to: plugin: bb-Polls
fel64
MemberI’m _not_ saying it’s better. It could be. I’m just wondering about other people’s thoughts and reasons on optimising this.
August 3, 2007 at 9:57 pm #56243In reply to: No ajax on replies
Null
MemberGot proof it had ajax posting….
From the automattic site:
All the features you need—like tags, AJAX posting, categorization, modular user system—and nothing you don’t.
We want it back
August 3, 2007 at 9:35 pm #59744In reply to: plugin: bb-Polls
fel64
MemberCan someone demonstrate what the polls are like? Has someone got one live to look at?
_ck_, you’re storing who voted for what in the topicmeta, right? You mentioned that unserialising stuff was a huge performance hit earlier, wouldn’t this be an issue especially with a large number of voters? What are your thoughts about implementing a bb_votes table to record who voted and how? (I’m not saying that’s better, I’m just wondering what your thoughts are on this because it interests me
)LOL! so why did everyone cry out for a poll plugin then?
I’m not sure everybody did.
August 3, 2007 at 8:24 pm #56381In reply to: Plugin: bbMenu 1.1
M
MemberHmmm. Let me take a look.
Either
$r1and$rwneed to be switched, or$r1isn’t an array.Edit:
Lines 358 – 360 should contain the following:
$r = (array) $bbdb->query( "SELECT * FROM ~$bbdb->menu~ WHERE ~set~ = 'active' ORDER BY ~order~ ASC" );
foreach( $r as $rw ) {Replace the
~with backticks. I don’t know how to escape backticks in bbPress.August 3, 2007 at 8:06 pm #59742In reply to: plugin: bb-Polls
mazdakam
Memberyes i found these to your to do

: admin menu (coming soon – edit plugin directly)
: administrative editing of existing polls.
: multi-language support
August 3, 2007 at 7:52 pm #59741In reply to: plugin: bb-Polls
mazdakam
Member_ck_ you move so fast!

i just play with the css and come but found that you make new one
)so it is now with better style thx but
please insert messages or strings in __() and _e() because it is prepare to fast translation with mo files
and if you put strings in these 2 function i can translate it in 2 minutes and it is good way for internationalistion
i think as you know we need to manage polls in admin area
and ability to select user to poll
and the creator of poll can edit the poll
also it will be very good if in frontpage we can see poll icon insted of [poll]
thanks for your great job
August 3, 2007 at 7:15 pm #59739In reply to: plugin: bb-Polls
_ck_
ParticipantI highly doubt most bbpress installers will continue to use the default template longer than a week or two. It’s a very sterile 1990’s computer room look, green/white, wide & empty. Ugh.
Reminds me of that old school continuous computer paper:
http://www.jwodcatalog.com/imgLg/753000NIB0342.jpg
I can’t wait until bbpress gets some critical mass of users so we have all those thousands of creative wordpress folks slaving away on themes.
On a programming note, I’ve got to figure out how to trash the post data that’s sent so when doing a refresh after voting the browser doesn’t nag the member that the post data will be resent (it won’t affect the poll stats if it does but still I don’t want that post data there). Probably have to do a redirect after submit which is a shame as it has to load bbpress twice then.
August 3, 2007 at 7:03 pm #59738In reply to: plugin: bb-Polls
Null
MemberHmm kee, though I should release this plugin (when done) based on the default template (most are using that)
August 3, 2007 at 6:38 pm #59736In reply to: plugin: bb-Polls
Null
Memberow make the text black (forum black) and not green, cause the hyperlink color is green already…
I also would put the options underneeth each other (the options to choose for single or multy voting)
(sorry I am an usability nerd
)Looks great further, keep up the good work
August 3, 2007 at 6:06 pm #59731In reply to: plugin: bb-Polls
_ck_
ParticipantSince bb-polls is completely css driven, you could actually make it look like any of theirs – with a few hours of work. Background images, submit button images, poll bar images – they all can be applied.
I think I’m doing enough work on the engine though. Someone else can spend the hours to skin it
August 3, 2007 at 5:22 pm #59727In reply to: plugin: bb-Polls
mazdakam
MemberYou should really change the default colors to something compatible with bbPress… it’s easy to change them, but still.
i agree with i! vey bad color
August 3, 2007 at 8:34 am #59718In reply to: plugin: bb-Polls
_ck_
ParticipantInstalling it will definitely answer all your questions.
Many answers are yes. The current options near the top will give you an idea.
I designed it from the start to allow votes on multiple selections or single section – the poll creator can decide.
bbpress cleans up the topic meta on its own, so if the topic is deleted in theory the meta is deleted (but bbpress doesn’t really delete topics yet, it just flags the differently)
you can decide if polls close with the topic or not
you can also decide if the poll is shown on each page of the topic or just the first
only members can vote – I do not have any plans to implement non-member voting, it defeats the purpose and makes the code much more complex
Eventually I will do more than horizontal bars which will make a higher load (I am sure I can find an existing easy library). Bars are currently done in pure CSS which makes it lightning fast and completely customisable with colours and even rounded corners with images.
August 3, 2007 at 8:28 am #59717In reply to: plugin: bb-Polls
Null
MemberSome questions:
Vote, more then 1 option possible option? (max setting like classic (just 1 option possible) 2 options, 3 etc

If a topic is deleted, does it clean-up the poll as well? (since a real deletion isn’t happening in bbPress, this wouldn’t be a problem for now)
What happends if a poll is deleted? (but topic still excists)
Who can vote? All? Members?
If a topic is closed, automaticly close voting aswell?
Results are in horizontal bars? Perhaps option to show them like a pie (or even vertical bars)
Even better if a user can choose this when seeing the results:Option result 1: ===============
Option result 2: =====
Option result 3: =========
Show as bars | Show as pie
Would like to see a demo, cause can’t test this at work

Greetz
August 3, 2007 at 7:48 am #59707In reply to: on plugin deactivation…
Sam Bauers
ParticipantI don’t think your code was correct in any case. But I’m not sure what the correct procedure is.
Apply the patch in the ticket (or make the changes manually) and try again.
August 3, 2007 at 7:30 am #59705In reply to: on plugin deactivation…
Null
MemberSo I accedentily discovered a bug? :p Is the rest of my code correct? And how about: on plugin activation? Perhaps it has the same issue?
August 3, 2007 at 1:44 am #59694In reply to: Support Forum Plugin not Updating Status
Sam Bauers
ParticipantYou also need to have the “bb_head” hook in your template head below the enqueue javascript call.
<?php bb_head(); ?>August 3, 2007 at 12:15 am #59492skipdaddyo
MemberAlso in bb-includes/functions.php
function get_latest_topics – added $now and tweaked $where
$now = bb_current_time('mysql');
$where = "WHERE topic_status = 0 AND topic_start_time <= '$now'"; -
AuthorSearch Results