New Zenner
- Join Date:
- Dec 2006
- Posts:
- 16
- Plugin Contributions:
- 0
Link Manager 3.0 Support Thread
Well it looks like it might be time to migrate hosts. in the meantime I think that it is up again. (I can get to it at least)
Views: 486,682
New Zenner
Well it looks like it might be time to migrate hosts. in the meantime I think that it is up again. (I can get to it at least)
Deceased
I've been trying every 10 mins for the past hour and still no luck.
New Zenner
ugh. I twas working last night. Kobra mentioned a different hosting solution that I might be better off with. It is definatly time to move.
Totally Zenned
Great work Clyde! :)
However, I've found a few problems when running under php 5.2.0.
I was receiving the following error messages when trying to add link categories from the admin.
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\server\xampp\htdocs\beyondeuphoria\748596\link_categories.php on line 110
Warning: reset() [function.reset]: Passed variable is not an array or object in D:\server\xampp\htdocs\beyondeuphoria\748596\includes\classes\object_info.php on line 29
Warning: Variable passed to each() is not an array or object in D:\server\xampp\htdocs\beyondeuphoria\748596\includes\classes\object_info.php on line 30
A little query to Google lead me to this thread...
So I hacked your code a little (with only a rough idea of what I was doing) and came up with this edit to admin/link_categories.php. I simply replaced the code on line 109 with the following...
// bof php5 fix - aclarke - 281206
$cInfo_array = array_merge((array)$link_categories->fields, (array)$links_count->fields);
// eof php5 fix - aclarke - 281206
I've also noticed two more errors (which I am attempting to fix at the moment).
1 - If no links categories exist and you view the links page (from your shop/catalog - not admin) the following error message is displayed.
Fatal error: Class 'infoBox' not found in path\to\zencart\includes\templates\custom\templates\tpl_links_default.php on line 61
2 - When trying to add links from admin this error message was displayed.
Catchable fatal error: Object of class queryFactoryResult could not be converted to string in path\to\zencart\admin\includes\functions\html_output.php on line 333
Without fixing these errors (mainly number 2) I am unable to add any links!
Anyway... as previously mentioned I'm working on a fix for these.
Thanks again for creating a great contribution and I'll post back with my solutions/results asap.
:)
Deceased
Alex,
Thanks for the update.
I'll incorporate your php5 fix and do an upgrade.
I'm not sure about the other errors. mainly because if no categories exist then the link sidebox won't appear at all (or it shouldn't) and technically you wouldn't be able to navigate to the links page. You can if you type the url into the browser navigation bar.
to correct this just change line 61 in tpl_links_default.php to
<?php echo TEXT_NO_CATEGORIES; ?>
I'll check the other error and see if I can find a fix.
Deceased
Alex,
Try as I might, I was unable to duplicate your #2 error when adding links from Admin.
Totally Zenned
Thanks for the quick reply.
The 'line 61 in tpl_links_default.php' fix worked great. I'm not using the links sidebox and infact link to the links page using a standard hyperlink (located in the footer of my site).
Maybe it would be helpful to others to include this 'fix' in the next release?
As for the other error (number 2) I'm using php 5.2.0 and I don't think (not tried yet) this error will occur with earlier versions of php.
If I get a moment I'll test it out and post my results.
Thanks again for your hard work with this contribution. :)
Deceased
Alex,
I just put together an update with your php5 fix in admin/links_categories.php and the fix for tpl_links_default.php line 61.
The other error may well relate to php5. My host is using 4.4.2 and as I said, I couldn't reproduce the error (I added half a dozen links from admin).
Zen Follower
Is there a way to arrange the links in a different order than the default? I would like for my links to show from latest to oldest with the lates being number 1 and so on. Does anybody know if that is possible?
Thanks in advance for your time
Deceased
I can work on a sort order for the links and see what I can come up with. Right now the default order is all there is.
Totally Zenned
clydejones:
Alex,
I just put together an update with your php5 fix in admin/links_categories.php and the fix for tpl_links_default.php line 61.
The other error may well relate to php5. My host is using 4.4.2 and as I said, I couldn't reproduce the error (I added half a dozen links from admin).
Mmm... I'll look into this over the weekend and report back.
clydejones:
I can work on a sort order for the links and see what I can come up with. Right now the default order is all there is.
Talking about sort orders... would it be possible to display the most popular (links with most clicks) first? This would be a nice feature. :)
Deceased
2 - When trying to add links from admin this error message was displayed.
Catchable fatal error: Object of class queryFactoryResult could not be converted to string in path\to\zencart\admin\includes\functions\html_output.php on line 333
>
> Without fixing these errors (mainly number 2) I am unable to add any links!
Alex,
Evidently this has something to do with line 365 in admin/links.php
```php
echo zen_draw_pull_down_menu('links_category', $categories_array, $lInfo->links_category, '', true);
and its interaction with this function in admin/includes/functions/html_output.php
function zen_draw_pull_down_menu
``` at line 325
Deceased
Sort Order Update:
I'll incorporate this into the regular release at a later date, but for now if you want to have sort order options for your links you can use this.
Unzip the files:
run the included links_sort_order.sql using the Zen-Cart Sql Patches tool
(admin -> tools -> install sql patches)
Change the YOUR_TEMPLATE folder to match the name of your custom directory
FTP the includes folder to your site
[Attachment no longer available]
Deceased
Once the the sort order option is installed just go to admin ->configuration -> links manager -> select sort order and choose the option you want.
Totally Zenned
Excellent! :)
I'm currently working on a fix for my 'error number 2'.
Everything works fine when running php 5.1.6, but on my live server I'm running php 5.2.0. :(
However, it houldn't be too hard to fix this... I'll post back when I'm done.
Thanks again for your support and this great contribution! :)
Totally Zenned
clydejones:
Alex,
Evidently this has something to do with line 365 in admin/links.php
echo zen_draw_pull_down_menu('links_category', $categories_array, $lInfo->links_category, '', true);
> and its interaction with this function in admin/includes/functions/html_output.php
> ```php
function zen_draw_pull_down_menu
``` at line 325
Isn't it **lines 478 - 495** that are causing this error?
<?php
$link_statuses = array();
$links_status_array = array();
$links_status = $db->Execute("select links_status_id, links_status_name from " . TABLE_LINKS_STATUS . " where language_id = '" . $_SESSION['languages_id'] . "'");
while (!$links_status->EOF) {
$link_statuses[] = array('id' => $links_status->fields['links_status_id'],
'text' => $links_status->fields['links_status_name']);
$links_status_array[$links_status->fields['links_status_id']] = $links_status->fields['links_status_name'];
$links_status->MoveNext();
}
echo zen_draw_pull_down_menu('links_status', $link_statuses, $lInfo->links_status);
if ($action == 'edit' || $action == 'update') {
echo ' ' . ENTRY_LINKS_NOTIFY_CONTACT;
echo zen_draw_checkbox_field('links_notify');
}
?>
Totally Zenned
Ok, it appears that line 489 is causing all the problems.
echo zen_draw_pull_down_menu('links_status', $link_statuses, $lInfo->links_status);
I've also noticed that the admin menu doesn't work on my links.php page.
Deceased
I could be.
The error:
Catchable fatal error: Object of class queryFactoryResult could not be converted to string in pathtozencartadminincludesfunctionshtml_output.php on line 333
points to line 333 in html_output.php which is inside the function for drawing the dropdown.
Totally Zenned
That's what I'm thinking, but I'm not sure how to fix it. :(
Totally Zenned
Ok, I've sorted it.
Just replacing line 333 in admin\includes\functions\html_output.php with the following worked.
// bof php5 fix - aclarke - 301206
if (empty($default) && isset($GLOBALS['$name'])) $default = stripslashes($GLOBALS['$name']);
// eof php5 fix - aclarke - 301206
However, my admin menu still doesn't work when I'm on the links.php page. :(
Also, when adding a new link the category field is marked as required? Is this correct? I've just added a link without a category (as I have no categories setup yet) and it didn't nag me to specify a category.
Fields marked required must be completed.
Tell staff why this post should be reviewed.
Required for login, security, and core site functionality.
Help us understand how the site is used so we can improve it.
Used for promotion and personalized campaign measurement.