matt_price
Forum Replies Created
-
just had a look at the wordpress source —
I am customizing wp_install_defaults and wp_install as per various guides e.g.:
http://www.kathyisawesome.com/421/customizing-wordpress-install/I looked at wp-admin/install.php and from what I can tell wp_install is called right at the end of the install process — so vanilla wordpres *should* be done with install when it finishes running. I’ve put my code right at the end of hte function, so I don’t see how the changes to wp_options would be reverted by wordpress. do you think CCTM is doing it somehow? thanks again,
mattthanks as always Everett!
I can’t seem to get this to work on install. I do have some code that will work if I insert it into a template:
// now we need to activate the CCT definitions at startup if (file_exists(WP_PLUGIN_DIR . '/custom-content-type-manager/index.php') ) { require_once(WP_PLUGIN_DIR . '/custom-content-type-manager/index.php'); require_once(WP_PLUGIN_DIR . '/custom-content-type-manager/includes/CCTM_ImportExport.php'); $uploads_info = wp_upload_dir(); prdebug("wp_uploads_dir basedir returns " . print_r($uploads_info) ); $cctmdefspath = $uploads_info['basedir'] . "/cctm/defs/" . $CCTMDEFS; if (file_exists($cctmdefspath)) { prdebug("found it" . $cctmdefspath); // CCTM_ImportExport::activate_def($CCTMDEFS); prdebug("trying with a static string even though cctm is set to " . $CCTMDEFS); CCTM_ImportExport::activate_def('historydepartmentjune2012.cctm.json'); } }(sorry there’s some cruft in there — I was trying to see if something was going wrong with variable assignments, turned out not to be the culprit).
At first I though maybe your function just wasn’t running, but by inserting some error checking code into activate_defs I was able to confirm that wordpress finds the json file, checks its accuracy, and even merges the data into the database (I looked in phpmyadmin).
This all happens in the first stage of the install. But then in stage 2, the value of ctm_data in wp_options is reset to the default text (“this site was constructed in part with…” etc.). At this stage a bunch of new options — not CCTM related — are also added to the database. So I wonder if there’s some process in WP that overrides this option, or some code in CCTM that doesn’t activate until, say, first login or something, and which causes the option to be overwritten.
regardless, I’m pretty pleased with my new wordpress build system, which lets me add plugins and themes automatically on install; it lives in github:
https://github.com/titaniumbones/uoft-wordpress-distroand is in pretty terrible shape right now, but will get better over the coming month or so. With CCTM in particular it would be cool to be able to provide a kind of wordpress distro in just a few steps — that’s what I’m working towards. Loading the CCTM defs by default will cut one more step out..
Matt
in my case the problem was that I hadn’t modified the -skin-default selectors in the CSS to -skin-myskinname, so the arrows weren’t showing up. Changing those seletors caused the arrors to show up again.
… and I supose it might make sense to also have an option to either display the title, or not.
Forum: Fixing WordPress
In reply to: Custom screen options in PostsDid you ever figure this out? If so I’d love to hear about it, I have the same question.
gnashing teeth. I guess your holidays down there start… already. is there a current dev release that includes some of this summarize_posts stuff? I can do some beta testing if you like, the site still isn’t live (though it’s getting a bit crazy, this lateness of mine).
I guess I can take a look at that category archives plugin and rewrite it to permit filtering on a custom taxonomy (I imagine it’s pretty straightforward). It’d be nice if there’s a way to generate the variable (cat=5) based on some other criterion (URL?); that way I could use the same template for listing e.g.:
– faculty
– undergrad faculty
– grad faculty
– studentsSince I don’t really understand what wordpress knows about the posts its presenting, or how it decides what to show in the_loop, I’m not quite sure how to solve that part.
thanks again, everett…
ah, figured it out — I needed both for the archive option in advanced to be checked, and for the rewrite to be set to /%postname%/ in URL. I was experimenting randomly, not systematically, and hadn’t hit on the right combination. Sorry for the noise!
On the other hand, seeing the results here raises some questions for me:
– if, say , I want to reorder the archives by sorting on custom field, do I do that directly in my template (archive-book/php, in this case)? In that case is the best practice to leave the orderby field unset?
– I realize I probably want a fair bit of text at the top of some of these archive pages, and I probably want the staff to be able to update that text if they want. Should I use summarize_posts instead of WP’s built-in archiving? Can I e.g. display and format a custom field with the summarize_posts shortcodes? Can I use CCTM’s output filters with those shortcodes?
– I may have asked this somewhere already… if I want to filter the archive on a custom taxonomy, is there a built-in way to do that, or will I have to write a half-dozen different templates that differ only in the parameters that are set in the call to get_posts? Seems crazy, but I’m not seeing an obvious wat to do it differently.
Forum: Fixing WordPress
In reply to: Help with Cusotm Taxonomy archive pages!Hi,
I was really hopeful that you might be right, because I had problems with this kind of ‘namespace collision’ before. But I don’t think this is the issue — instead, I just stupidly posted in the wrong link. Here’s a better example:
Here’s a custom taxonomy which should have a number of posts associated with it. Instead, it’s empty:
http://department-test-wp.hackinghistory.ca/periods/modernThe earlier links are really truly dead now — this is a better example. Thanks!
MattForum: Fixing WordPress
In reply to: Shortcodes not working?ah, I realize my mistake — I was reading the wordpress.com documentation:
http://en.support.wordpress.com/code/posting-source-code/I guess I have to install syntaxHighlighter and maybe modify it a little bit to make this work. Thanks much though!
Matt