I uploaded the file into the admin folder. But nothing has changed. I still can't add and show a link.
I uploaded the file into the admin folder. But nothing has changed. I still can't add and show a link.
Is there a way to set the number of links to be listed per page? I would like to limit it to 5 or so per page to decrease load time.
Thanks!!!
it is set up to display the maximum number of results which is set in
admin -> configuration -> maximum values -> Search Results Per Page
The default value for this setting in Zen Cart is 20.
To make the change you are looking for would require modifying the configuration settings in admin -> configuration -> links manager as well as rewriting several lines of code in the links manager files.
Clyde, I have modified this mod to be used to upload recipes. No images are necessary for the recipes, so can you tell me how to turn off the message stack error "Warning: no file uploaded"? See here http://www.ncwheatmontanacoop.com/or...e=links_submit
I got rid of the default banner message but can't figure out how to get rid of the other one.
Also, is there a way for the recipes to keep their formatting without me having to go into the admin and format it with HTML? It's all coming out one big blob of text with no line breaks. Our recipe submitters don't all know HTML.
Thanks!
Amy McCoy
Baby Gifts and Baby Gift Baskets
Amy,
I'm not sure which files you've modified (and/or whether you changed the names of the files) but I can give you a general outline of what you need to do based on the original Link Manager file names and locations.
first you'll need to modify includes/modules/pages/links_submit/header_php.php
at about line 14 delete/comment out the following line of code:
Next delete the folllowing section of code beginning at around line 81 - 98Code:require(DIR_WS_CLASSES . 'upload.php');
save the file and upload to your server.Code:// BOF Upload an image when form field is filled in by user if ($links_image = new upload('links_image_url')) { $links_image->set_destination(DIR_WS_IMAGES . LINK_IMAGE_DIRECTORY); if ($links_image->parse() && $links_image->save()) { $links_image_name = LINK_IMAGE_DIRECTORY . $links_image->filename; } if ($links_image->filename != '') { $db->Execute("update " . TABLE_LINKS . " set links_image_url = '" . $links_image_name . "' where links_id = '" . (int)$links_id . "'"); }else { // Use default image if form field is left blank $links_image_name = LINK_IMAGE_DIRECTORY . DEFAULT_LINK_IMAGE; $db->Execute("update " . TABLE_LINKS . " set links_image_url = '" . $links_image_name . "' where links_id = '" . (int)$links_id . "'"); $messageStack->add_session('header', WARNING_DEFAULT_FILE_UPLOADED, 'success'); } }
Next open includes/modules/YOUR_TEMPLATE/link_listing.php
Find the following section of code at around line 73 - 76
replace this section with the following code:Code:if (DISPLAY_LINK_DESCRIPTION_AS_LINK == 'true') { $lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a><br /><a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_description'] . '</a>'; } else { $lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a><br />' . $listing_query->fields['links_description']; }
Save the file and upload to your server.Code:if (DISPLAY_LINK_DESCRIPTION_AS_LINK == 'true') { $lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a><br /><a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . nl2br($listing_query->fields['links_description']) . '</a>'; } else { $lc_text = '<a href="' . zen_get_links_url($listing_query->fields['links_id']) . '" target="_blank">' . $listing_query->fields['links_title'] . '</a><br />' . nl2br($listing_query->fields['links_description']); }
Let me know if you need additional assistance.
Clyde, I did not change any file name! I didn't want to work that hard and I probably would have broken it! Your fix worked perfectly. I am going to tinker with the display page and see if I can get it to look like I need it to. I'll let you know if I booger any thing up or need some help :o) Thanks! Your influence is far and wide
Amy McCoy
Baby Gifts and Baby Gift Baskets
By display page I'm guessing you mean the page with the categories/images
I'd suggest that you make the images all the same size height x width (i.e. the default for links manager for category images is 80 x 80) doin this will insure that all the images line up correctly and you shouldn't get the gaps that are showing up now.
Just a suggestion.
Yep, that's next on my list. I have tried to get the page to display as I want it to, but I don't know how to get what I need, so if you could teach me how that would be great!
http://www.ncwheatmontanacoop.com/or...ain_page=links
For the above page (and all others eventually), I would like where it says "Recipes" in bold, just above "Our Members' tried and true recipes!", I want it to say the category title...in this case, "Yeast Breads".
Next, I need for the titles to be non-clickable, larger font, and in bold. Also, the line at the top of the page, if that could show up between each Recipe to separate them, that would be great.
I have gone around and around with this, but this is a part of code that I don't yet understand. I know this is not a Links Manager application, but I sure appreciate your help! Maybe when it's all done, you could upload it as another contrib...
Amy McCoy
Baby Gifts and Baby Gift Baskets
Bookmarks