BBPress Steven Zahm : Replies Created

Forum Replies Created

Viewing 10 posts - 12,941 through 12,950 (of 15,332 total)
  • Author
    Posts
  • in reply to: call category #269977
    Steven Zahm
    Keymaster

    @ Jonathan

    Not sure I understand exactly what you’re asking, sorry. are you looking to limit the results to a specific category and show only those entries to the that category.

    in reply to: Public data not shown #269969
    Steven Zahm
    Keymaster

    @ Jon

    It doesn’t make any sense that changing the flag for for cached doesn’t work. That’s the only difference between showing the data in the frontend and the admin/edit form. Question, after you changed the cache flag, did you check while logged out or in? If you didn’t then you’re viewing the data with the same permission you have as in the admin; which means you would see all listed. That would be expected.

    Another quick question … which version where you running that worked and which version did you update to where it stopped working? If you have that info, I could pull a diff and see what might have caused the issue to begin with. If you don’t know, no worries.

    Bulk updating should be simple. You need to be on 0.7.9+ for this to work:

    
    add_action( 'cn-loaded', 'cnBulkUpdate' );
    
    function cnBulkUpdate() {
    
    	$results = $connections->retrieve->entries();
    
    	foreach ( $results as $row ) {
    
    		$entry = new cnEntry( $row );
    		$entry->update();
    	}
    }
    
    

    Dropping this in the theme’s functions.php file should do it.

    A few words of caution…

    I didn’t test the code, but there’s no reason it should not work.

    IMPORTANT: Put your site in maint mode and sure no others are on the site before you add this code because it will run on every page load. That would be bad.

    I would test with a single broken entry first to make sure it’s all good; like so:

    
    add_action( 'cn-loaded', 'cnBulkUpdate' );
    
    function cnBulkUpdate() {
    
    	// X == the entry ID to update.
    	$results = $connections->retrieve->entries( array( 'id' => X ) );
    
    	foreach ( $results as $row ) {
    
    		$entry = new cnEntry( $row );
    		$entry->update();
    	}
    }
    
    

    I would also suggest increasing the PHP memory and max exec time. What you have set now should be perfectly fine; but why chance it, right?

    After you test on a couple and you’re satisfied that it worked. Go ahead and do them all. Don’t worry about excluding the ones you tested on.

    Let me know how it goes.

    in reply to: Address : getAddressBlock #269957
    Steven Zahm
    Keymaster

    @ James

    The <a href="https://github.com/shazahm1/Connections/blob/0.7.9.1/includes/class.output.php" target="_blank">class.output.php</a> file has extensive phpDoc for most of the methods including <a href="https://github.com/shazahm1/Connections/blob/0.7.9.1/includes/class.output.php#L821" target="_blank">getAddressBlock()</a>

    I suggest review this file and docs…

    Here’s and example to output only the preferred address:

    $entry->getAddressBlock( array( 'preferred' => TRUE ) );

    You can not make a custom field in place of the “other” address type. That is just an option for the for the address type and that field can not be changed easily and I have no idea what would break if you did. Since the address supports 3 lines; what not just use Line 1 as the company name?

    in reply to: Editing Core Template Files #269956
    Steven Zahm
    Keymaster

    @ James

    Dupe the folder giving it a new name. Give these files a new name:

    cmap.min.css
    cmap.min.js
    cmap.php

    Open the cmap.php and change every reference to cmap to something else. Make sure the reference to the css/js file names match whatever you renamed the files as.

    After you’ve done that, you should be able to safely Active the plugin and it should show up as template option on the Connections : Templates admin page.

    in reply to: Modify templates #269945
    Steven Zahm
    Keymaster

    @ Sandro

    Not sure what you mean by “uploaded log”. There is no upload log kept by Connections.

    in reply to: Editing Core Template Files #269943
    Steven Zahm
    Keymaster

    @ James

    You can not move cMap into the connections_template folder that is currently there only to support legacy templates.

    What do you want to translate in the template? All the strings can be set via shortcode options. See this FAQ for more details.

    Here’s the complete list of str_***** options available to cMap.

    str_select='Select Category'
    str_select_all='Show All Categories'
    str_image='No Logo Available'
    str_tray_image='No Photo Available'
    str_map_show='Show Map'
    str_map_hide='Close Map'
    str_bio_head='Biography'
    str_bio_show='Show Bio'
    str_bio_hide='Close Bio'
    str_note_head='Notes'
    str_note_show='Show Notes'
    str_note_hide='Close Notes'
    str_contact='Contact'
    str_home_addr='Home'
    str_work_addr='Work'
    str_school_addr='School'
    str_other_addr='Other'
    str_home_phone='Home Phone'
    str_home_fax='Home Fax'
    str_cell_phone='Cell Phone'
    str_work_phone='Work Phone'
    str_work_fax='Work Fax'
    str_personal_email='Personal Email'
    str_work_email='Work Email'
    Steven Zahm
    Keymaster

    @ dgalassi

    Adding it to the theme style.css file will not do it because that is not loaded in the admin.

    Add it to the cn-admin.min.css file found here: ../wp-content/plugins/connections/assets/css/

    I just tried it, it definitely hides the category metabox in Link.

    in reply to: Warning: Invalid argument supplied for foreach() #269894
    Steven Zahm
    Keymaster

    @ Ed

    It sounds like your server is configured to display PHP notices. You should ask your webhost to configure it to log them instead in the PHP error_log file. That is what should be done on a production server. Granted, I should clean up the script a little so it doesn’t create notices at all … which will be done as part of the complete re-write I am working on.

    Any way, after they make that change, try importing again because that could fix the 500 error too. If you still get an error, please let me know. We’ll try something else.

    in reply to: Editing Core Template Files #269893
    Steven Zahm
    Keymaster

    @ James

    1. Yes, any changes you made would have to be done again. The latest template API for Connection is pretty robust but it does need a little more flexibility for tweakers. I plan on doing that, hopefully for the .8 or .9 release. The idea will be you will be able to dupe the part of the template and drop it in an update safe location and that location will override the core file / callback. Now that doesn’t mean the override won’t break; that’ll depend on what you changed but if it’s minor tweak it should be fine. Another downside is if a bug or a new feature was implemented in the file you overrode you will get that feature. Honestly though, I think it would break first. That would really depend on the feature.

    2. No, Custom templates will only have the features you program in them. There is no inheritance. Unless, of course, you base your custom template on a template which already includes said features.

    Hope that makes sense!

    in reply to: Public data not shown #269892
    Steven Zahm
    Keymaster

    @ Jon

    Not sure it could be a plugin conflict. Try this … open the class.output.php file. Do a search for Block(. In each instance that you see , $cached = TRUE ) { on the same line; change TRUE to FALSE. There should be only 8 instances. Save and upload. Now Connections will never use the cached data from the main table. Doing this will definitely cause much more db usage.

Viewing 10 posts - 12,941 through 12,950 (of 15,332 total)