« first day (382 days earlier)      last day (4551 days later) » 

9:19 AM
Had a problem with spam some time ago and wrote about it here. What do you know. I had been using wp-spamfree plugin and I guess someone found some sort of route there due to what lately I've been receiving more and more spam comments. After disableing, that plugin there where no spam messages for now. :)
 
9:33 AM
morning all
 
10:24 AM
hiya
 
10:43 AM
how were people developing without DVCS?.. I can't remember. those horrible memories slipped away...
 
11:30 AM
core.trac.wordpress.org/ticket/17626 crickets... I wonder how many tickets just gather dust by now
 
11:57 AM
can you use settings API when using add_theme_page() ?
 
why is reading CSV such a mess in PHP?.. :(
 
i thought its dead easy providing you got a recent version of PHP
 
yeah? try it... there are easy functions that produce output that makes no sense whatsoever because what passes for CSV for Excel and Google Docs doesn't fly for PHP
it doesn't parse whole file. you need line by line. but if you split into lines you break multiline values.
 
never had that trouble
if multiline content in a cell is wrapped in "" or any other terminator then there shouldn't be a problem
 
there is. how exactly you parsed?
 
12:08 PM
let me test
in excel how do you get text to go onto two lines?
 
line break inside cell
 
wont let me
hah! I have to manually copy/paste a line break in
 
try shift+enter or something.... don't remember (use Google Docs at mo)
or that
 
it wont let me keyboard add one in a cell
tried that
^^ my test document
 
found the issue
2
Q: How to parse csv in PHP having multiline data in a column

ErgecConsider s CSV file like this item1,"description 1" item2,"description 2" item3,"description 3 description 3 continues on new line" item4,"description 4" which should be parsed like this item1,"description 1" item2,"description 2" item3,"description 3 description 3 continues on new line" item...

it works if you use file pointer, but not if you read file into string and parse string
 
12:16 PM
<?php
$mydata = array();
if (($handle = fopen("Book1.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $mydata[] = $data;
    }
    fclose($handle);
}
echo "<pre>";
print_r($mydata);
?>
^^ output is perfectly fine
not so hard after all :P
 
yeah that works... it says "line" but what it really means is "multiline line in context of CSV". I was using str_getcsv() and it went to hell
 
do I win this one?
 
sure :) we keeping count or something? :)
 
no
its not often I have 1up
 
hm? I'd say pretty often, you can wipe floor with me in JS all day long
 
12:21 PM
yeah but this is PHP
 
$wpdb->update() is awesome
 
uh huh
damn settings API
does the settings API work if its loaded up from a themes functions file?
 
define loaded? it shouldn't really care
 
cos for the life of me I cannot get it to work at all at the moment despite copying a previous bit of my work that does work
// Register Settings
add_action('admin_init', 'sc_hi_rezz_theme_settings_register');
function sc_hi_rezz_theme_settings_register() {
    register_setting("hi_rezz_theme_options", "hi_rezz_theme_options", "sc_hi_rezz_theme_settings_validate"); // Register Main Settings
    add_settings_section("sc_hi-rezz", __("Hi Rezz Settings", "hi-rezz"), "sc_hi_rezz_theme_settings_main_text", "sc_hi_rezz_settings"); // Make settings main section
    add_settings_field("hi_rezz_theme_settings_footer_copy", __("Footer Copy", "hi-rezz"), "sc_wpfmp_settings_main_field_cron_method", "hi_rezz_theme_options", "
^^ in my functions file
// Options Page Layout
function sc_hi_rezz_theme_options_do_page() {
    ?>
    <div class="wrap">
        <?php screen_icon(); ?>
        <h2><?php _e( 'Hi Rezz Settings', 'hi-rezz' ) ?></h2>
        <form action="options.php" method="post">
            <?php
            settings_fields("hi_rezz_theme_options");
            do_settings_sections("sc_hi-rezz");
            ?>
            <?php submit_button(__("Save changes", "hi-rezz"), "primary", "submit", true); ?>
        </form>
    </div>
    <?php
^^ options page layout shows but the settings section and setting does not
 
damn, these arguments are always so confusing
 
12:36 PM
i know
 
I've tried to draw it once and is almost broke my brain
 
but ive been over them 100 times today and I cannot figure out why its not working
the full lot if that helps
fix cap bit is no longer needed
 
give me couple mins
 
could being on a multisite installation be a reason why this is not working from functions file...
 
change sections call to do_settings_sections("sc_hi_rezz_settings");
 
12:45 PM
thx
 
worked?
 
I just died a little inside
@Rarst yes ;)
 
meaning? :)
you were trying to call specific section, instead of collection of sections on page
 
yeah I know now :'(
several hours too late
 
I am slowly getting somewhere with using xdebug for actually debugging! :)
 
12:48 PM
I gone a long way down changing things cos I was sure it wasnt working in another place
then when I got to the new place it still didnt work :(
So now Ive undone all my code to put it back where it was and now it works :)
Settings API does work in the appearance section
 
1:33 PM
is this clear question?
0
Q: Extend WordPress search to include author search

BradyThere is many a WordPress plugin out there that enhances WordPress search but I have yet to find a plugin that will add author search. Search Everything used to have the functionality but was removed when WP moved to version 2.8. I suspect this was due to the way WP changed how authors were stor...

just that some one has answered to something that I'm not asking for
was wondering if I'm being clear enough
 
edit to stress that you need to search users, saying "authors" makes think that you want to search posts by author
 
ok will do
 
2:21 PM
@Brady Your downvote was kind of unfair. He was trying hard to help you (14 points).
 
there is a different between trying and actually helping
that answer wasted 15 mins of my life
 
You stated that after your edit. His answer was earlier.
 
I made the edit to double emphasis what I was after. I was clear before what I was after. The user misunderstood or didn't read my question properly and the answer he provided was wrong, thus the down vote. I then edited my question to make sure others didn't make the same mistake
I'm not down voting cos I'm being spiteful or mean. The answer is of no use it gets down voted.
 
 
2 hours later…
4:29 PM
in WP is there a way to get a page permalink without the wpurl?
 
4:53 PM
Anyone good with permalinks here?
want to know if this is bullet proof
<?php
add_action('init', 'sc_cpt_case_studies');
function sc_cpt_case_studies() {
	$labels = array(
		'name' => _x('Case Studies', 'post type general name'),
		'singular_name' => _x('Case Study', 'post type singular name'),
		'add_new' => _x('Add Case Study', 'news'),
		'add_new_item' => __('Add New Case Study'),
		'edit_item' => __('Edit Case Study'),
		'new_item' => __('New Case Study'),
		'view_item' => __('View Case Study'),
		'search_items' => __('Search Case Studies'),
		'not_found' =>  __('No Case Studies Found'),
 
 
5 hours later…
9:51 PM
Blind copy-pasta FTW! wordpress.stackexchange.com/questions/32739/… #headdesk
 
@ChipBennett "I can haz snippet..."
 
10:11 PM
I didn't think the code snippet would get taken quite so literally :)
 
it usually is. for us it's code. for average user it's a mystic spell...
I blame "WP is easy" campaign... no, it's freaking not! :)
 
 
1 hour later…
11:41 PM
@ChipBennett Btw: Really good job with your new hierarchy cheat sheet
 

« first day (382 days earlier)      last day (4551 days later) »