WordPress.org

Ready to get started?Download WordPress

Forums

Connections Business Directory
[resolved] [Plugin: Connections] Custom Templates Not working with the new release (1.7.2.1) (19 posts)

  1. htobon
    Member
    Posted 2 years ago #

    I had a custom template in the directory: ./wp-content/connections_templates

    But when I call it in my page using the following shortcode:
    [connections template_name='myTemplateName']

    I got the following error:
    "ERROR: Template myTemplateName not found."

    I had to roll back to a previous release.

    http://wordpress.org/extend/plugins/connections/

  2. htobon
    Member
    Posted 2 years ago #

    For your information, the custom template was working in the version 1.7.1.6.

  3. shazahm1
    Member
    Plugin Author

    Posted 2 years ago #

    Can you please submit a help desk ticket? Please include the template name so this can be addressed as quickly as possible.

    http://connections-pro.com/help-desk/

  4. htobon
    Member
    Posted 2 years ago #

    done

  5. smayernik
    Member
    Posted 2 years ago #

    is there a solution for this? Don't want to upgrade until I know it will keep my custom template.

  6. htobon
    Member
    Posted 2 years ago #

    Yes.. What I did was to remove the whole current installation and reinstall the new one.

    (The information was kept for some reason).

    My suggestion for you is to create another instance of your wordpress installation (as a test mode) and make the update there. If all is ok, justrun the update in the original site.

  7. shazahm1
    Member
    Plugin Author

    Posted 2 years ago #

    Well, where did you install your custom template? If you put it inside the templates folder within the connections folder, you will lose the template during the upgrade. That is just how WP plugin upgrades work, the plugin directory is removed.

    Now, if you put the template in ../wp-content/connections_templates, your template is safe.

  8. smayernik
    Member
    Posted 2 years ago #

    so, I put the templates in the folder wp-content/connections_templates as suggested, then did the upgrade. Now I'm getting the following error:

    Warning: opendir(/file folders hidden to protect the innocent/wp-content/connections_templates) [function.opendir]: failed to open dir: Permission denied in /file folders hidden to protect the innocent/wp-content/plugins/connections/includes/class.template.php on line 111

    Warning: readdir(): supplied argument is not a valid Directory resource in /file folders hidden to protect the innocent/wp-content/plugins/connections/includes/class.template.php on line 113

    Warning: closedir(): supplied argument is not a valid Directory resource in /file folders hidden to protect the innocent/wp-content/plugins/connections/includes/class.template.php on line 166

  9. shazahm1
    Member
    Plugin Author

    Posted 2 years ago #

    What is the permissions set for connections_templates? It should be 755. Can you confirm?

  10. smayernik
    Member
    Posted 2 years ago #

    realized after posting that it was seemed to be an issue with permissions. wasn't able change the file permission, so had to create a new file and do-over, which fixed that error

    Was able to correct that, but now my custom template isn't custom. It shows up in the Templates. But my customizations are missing. Checking files to see what I missed.

  11. smayernik
    Member
    Posted 2 years ago #

    feeling really stupid right now... my custom template shows in the Template screen, I've activated it, the file looks correct in the editor, but the customization don't appear in the directory.... ??? what am I missing

    <div class="cn-entry" style="-moz-border-radius:4px; background-color:#FFFFFF; border:1px solid #E3E3E3; margin:8px 0px; padding:6px; position: relative;">
    
    <table width="100%" border="0px" bgcolor="#FFFFFF" bordercolor="#E3E3E3" cellspacing="0px" cellpadding="0px">
    
        <tr>
    
            <td align="left" width="50%" valign="top">
    
            	<?php echo $entry->getCardImage() ?>
    
    			<div style="clear:both; margin: 0 5px;">
    
    				<div style="margin-bottom: 10px;">
    
    					<span style="font-size:larger;font-variant: small-caps"><strong><?php echo $entry->getFullFirstLastNameBlock() ?></strong></span><br />
    
    					<?php echo $entry->getTitleBlock() ?>
    
    					<?php echo $entry->getOrgUnitBlock() ?>
    
    				</div>
    
    				<?php echo $entry->getAddressBlock() ?>
    
    			</div>
    
            </td>
    
            <td align="right" valign="top">
    
            	<div style="clear:both; margin: 5px 5px;">
    
    	        	<?php echo $entry->getConnectionGroupBlock() ?>
    
    				<?php echo $entry->getPhoneNumberBlock() ?>
    
    				<?php echo $entry->getEmailAddressBlock() ?>
    
    				<?php echo $entry->getImBlock() ?>
    
    				<?php echo $entry->getSocialMediaBlock() ?>
    
    				<?php echo $entry->getWebsiteBlock() ?>
    
    				<?php echo $entry->getBirthdayBlock('F j') ?>
    
    				<?php echo $entry->getAnniversaryBlock() ?>
    
    			</div>
    
            </td>
    
        </tr>
    
        <tr>
    
            <td valign="bottom" colspan="2">
    
            	<?php echo $entry->getNotesBlock() ?>
    
            </td>
    
        </tr>
    
        <tr>
    
            <td valign="bottom">
    
            	<?php echo $vCard->download() ?>
    
            </td>
    
    		<td align="right" valign="bottom">
    
    			<span style="font-size:x-small; font-variant: small-caps; <?php">Updated <?php echo $entry->getHumanTimeDiff() ?> ago</span>
    
    			<?php echo $entry->returnToTopAnchor() ?>
    
            </td>
    
        </tr>
    
    </table>
    
    </div>
  12. smayernik
    Member
    Posted 2 years ago #

  13. shazahm1
    Member
    Plugin Author

    Posted 2 years ago #

    What I see on the page seems to match the code. What's the customization that is not showing? The one thing I don't see is the notes row that spans two columns.

    I guess, just make triple sure you do have the files in the correct locations and that they are up to date.

  14. smayernik
    Member
    Posted 2 years ago #

    yes, mainly it's the notes section. Could you confirm... if I edit the template in the wordpress editor under connections plugin, then any changes made should reflect in the directory page being displayed... doesn't appear to work that way

  15. shazahm1
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, the default templates can be edited using the plug-in editor which are in ../wp-content/plugins/connections/templates. It is not recommended to edit the default templates because any changes will get overwritten during a plugin upgrade.

    The custom template should be in ../wp-content/connections_templates which can not be edited with the plugin editor. You have to download the template file with an FTP program and edit the template locally and then upload the updated file.

  16. smayernik
    Member
    Posted 2 years ago #

    tried it both ways....

    tried uploading the custom template to ../wp-content/connections_templates, activating... didn't display

    then I tried

    uploading the custom template to ../wp-content/plugins/connections/templates, activating... didn't display

    tried editing the my template that appears in the editor (connections/templates/COTCcard-tableformat.php), still doesn't display

    so as a test, I set up the page in question so that the "Featured Listings" ask for a specific template (template="COTCcard-tableformat") and the rest of the listings used the default.

    results are different but neither is my custom template

    see http://centraloregontrailcourse.com/business-directory/tack-supplies/

    for the results

    I really do appreciate your help on this but rather than wasting more of our time on this I think I may just have to start over and edit one of the standard templates.

  17. smayernik
    Member
    Posted 2 years ago #

    fixed

  18. smayernik
    Member
    Posted 2 years ago #

    deleted my custom template and it's accompanying files/folder with the idea of starting fresh and hopefully figuring out what this wasn't working...

    solution:
    edit the template inside the new custom template folder /wp-content/connections_templates/New Table Entry Card/template.php/

    not the template just outside it
    /wp-content/connections_templates/New Table Entry Card.php

  19. Greg McMullen
    Member
    Posted 1 year ago #

    What exactly do you need to do to create a custom template? Will it show up in "connections" or is it just knowing what the folder is called?

    I've tried putting both a "test.php" and a "test" folder inside of the connections_templates with the shortcode template='test' but it said "template does not exist."

    I'd love to be able to get a custom template in place for what we are doing. Any help would be appreciated.

    Edit: I was able to get it to work. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic