Jump to content
Sign in to follow this  
VJ

[Contribution] Links Manager for osC v1.00

Recommended Posts

i installed the contribution and when try to submit link i get the following message:

 

Fatal error: Call to undefined function: checkurl() in /homepages/22/d163301193/htdocs/printingcanvas/links_submit.php on line 74

 

i wonder what does create this message?

 

any help would be appreciated

 

cheers

valeri

Share this post


Link to post
Share on other sites

It means it can't find the code it needs. Be sure you uploaded all of the files from the contribution. Especially the one that goes in the functions directory.

 

Jack

Share this post


Link to post
Share on other sites
It means it can't find the code it needs. Be sure you uploaded all of the files from the contribution. Especially the one that goes in the functions directory.

 

Jack

if i disable the "reciprocal" links = false - it works OK

i will check the files again as per your suggestion

cheers

Share this post


Link to post
Share on other sites
if i disable the "reciprocal" links = false - it works OK

i will check the files again as per your suggestion

cheers

thank you jack

 

very helpful

you were right,

 

by mistake i must have uploaded the wrong "links.php" to the admin and catalogue functions directories.

 

now updated and it works fine

 

cheers

valeri

Share this post


Link to post
Share on other sites

Hello everybody,

 

I have installed this very usefull contribution and i'd like to have the lists with 2 columns instead of one.

I only display link name and click counts. As my English is not very good and there are 43 pages in this thread, I did't found what I'm looking for.

If somebody does't understand, here is what I have :

 

(dots are needed to replace spaces in the forum)

|-----------------------------------------------------------------------------------------|---------------------------------|

| . . . . . . . . . . . . . . . . . . . . . Title + . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | . . . . . . . Clicks . . . . . . . . .|

|-----------------------------------------------------------------------------------------|---------------------------------|

| Google . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .| 1 . . . . . . . . . . . . . . . . . . . |

| Yahoo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .| 2 . . . . . . . . . . . . . . . . . . .|

 

 

I'd like to have something like that :

 

|-------------------------------------------|-----------------|-------------------------------------------|-----------------|

| . . . . . . . . . . . . Title + . . . . . . . . . | . . . Clicks . . | . . . . . . . . . . . .Title + . . . . . . . . . .| . . . .Clicks . . |

|-------------------------------------------|-----------------|-------------------------------------------|-----------------|

| Altavista . . . . . . . . . . . . . . . . . . . .| . . . . . 1 . . . .| Google . . . . . . . . . . . . . . . . . . . . .| . . . . . 2 . . . .|

| Yahoo . . . . . . . . . . . . . . . . . . . . . .| . . . . . 1 . . . .| . . . . . . . . . . . . . . . . . . . . . . . . . . .| . . . . . . . . . .|

 

 

I'm not sure to explain correctly, but I think these tables will be comprehensible.

 

As my Php level is near to "hello world", if somebody is strong enough with Php, I thank him in advance for his help.

 

Thank you for your replies.

 

Patrick.

Share this post


Link to post
Share on other sites

What you want is not possible with the current code but it is possible. However, it is not a simple change. Short of someone coding it for you, you will need to figure it out yourself or pay someone to do it.

 

Jack

Share this post


Link to post
Share on other sites

Hi, Jack

 

As I have seen that on line 444 in catalog/links.php, it was possible to change the width of the table, I thought that it was not too difficult to separate the table in two columns.

I use Oscommerce for my personal website because I have worked on two shops. It was more simple for me to work on Oscommerce than another CMS. Because of this reason and because I don't know Php enough, I will not be able to pay for this work if it is necessary to rewrite all the code.

 

Thank you for your response.

 

By the way, your contribution is very usefull for me. I have many different categories such as websearch, television, cars, work, ..., and I think that my visitors will appreciate the way links are ordered.

 

Patrick.

Share this post


Link to post
Share on other sites

hi, Jack,

 

I think that if I reduce the width of the table and I center it on the page, it would be enough to have a nice look.

 

On line 444, I've replaced <td> by <td width="400"> (this is simple even for me)

 

On line 420, I've replaced <td><php echo ... , by <td align ="center"><?php echo ... .

 

Could you tell me where I have to change the code to have the table centered on the page.

I have tried some changes by adding <td align="center">, but it did not worked (I am a real beginner with Php).

 

Regards.

 

 

Patrick.

Share this post


Link to post
Share on other sites

You may want to try the optional vertical listing (admin->configuration->Links) if you haven't already. It might give a better look for what you want. To center the code, this should work. In links.php, find this

		<td>
	<?php if (LINKS_DISPLAY_FORMAT_STANDARD == 'True')
	  include(DIR_WS_MODULES . FILENAME_LINK_LISTING);
	 else
	  include(DIR_WS_MODULES . 'link_listing_vertical.php');
	?>
	</td>

and change to

		<td align="center">
	<?php if (LINKS_DISPLAY_FORMAT_STANDARD == 'True')
	  include(DIR_WS_MODULES . FILENAME_LINK_LISTING);
	 else
	  include(DIR_WS_MODULES . 'link_listing_vertical.php');
	?>
	</td>

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

I am sorry to annoy you again with my problem, but I've tried to make the modifications you told me, but it does not work.

 

I've tried to add "align="center"" to every "<td>" and "<table>" one by one and all in once, but it does't work.

 

I have done this change :

 

<td align="center"><?php echo sprintf(TEXT_MAIN_LINKS, $link_categories_value['link_categories_name']); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php if (tep_not_null($link_featured_cat)) { ?>

<tr>

<td class="linkFeatured"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td align="center"><?php echo TEXT_FEATURED_HEADING; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td align="center"><?php echo $link_featured_cat; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php } ?>

<tr>

<td align="center" width="400">

<?php if (LINKS_DISPLAY_FORMAT_STANDARD == 'True')

include(DIR_WS_MODULES . FILENAME_LINK_LISTING);

else

include(DIR_WS_MODULES . 'link_listing_vertical.php');

?>

</td>

 

And here is what i get : Capture 01

Here is what i'd like to get : Capture 02

 

I've tried to reduce the width of the page, but the table is still left aligned.

 

If you can spend some minutes to solve my problem it would be very nice for me.

 

Thanks in advance.

 

Patrick.

Share this post


Link to post
Share on other sites

Hello,

 

I just installed Links Manager for osC(MS2) v1.14. Everything works just beautiful.

 

I got the error in Admin when I cliked on links and fixed that by the fix that was posted in the contributions.

 

Links Manager Admin Warnings FIX by El Chancho 23 Sep 2006.

All is good, that fixed that problem but when I click on Categories then click add category, I get this up top of the page: ;)

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/wwwshop/public_html/admin/link_categories.php on line 111

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wwwshop/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/wwwshop/public_html/admin/includes/classes/object_info.php on line 18

 

Yet everything works just fine. Any ideas on how to make it go away

 

Much Appreciated

 

Thanks

Share this post


Link to post
Share on other sites

There is a fix posted somewhere on the forums for this (maybe in this thread). Try going to google and typing this in the search string

site:forums.oscommerce.com Warning: array_merge() [function.array-merge]:

 

Jack

Share this post


Link to post
Share on other sites

Quite a few people have had this problem, seems that no one has answered and these people have not posted whether or not they found a fix. Maybe they learnt to live with it.

 

However I did find this:

 

QUOTE(peteruittilburg @ Jun 30 2006, 03:04 AM)

 

Also sometimes the errors are:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/sites/site81/web/adminshop/links.php on line 733

Warning: reset() [function.reset]: Passed variable is not an array or object

 

Mine is different from the one above. But the bottom two are the same. So Im not sure if it will fix my problem. Will it? As my problem is catagories not links.

 

in /home/sites/site81/web/adminshop/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in /home/sites/site81/web/adminshop/includes/classes/object_info.php on line 18

 

The first error refers to line 235 in admin/links.php:

$lInfo_array = array_merge($links, $category);

 

My knowledge of PHP is not that great, but I think it means that arrays $links and $category don�t exist. Looking into this file, I can�t find something like:

$links = array();

$category = array();

 

---------------------------------------------

 

It might be that there is nothing loading from the database. Find this code around line 733CODE $category = tep_db_fetch_array($categories_query);

 

$lInfo_array = array_merge($links, $category);and change it toCODE $category = tep_db_fetch_array($categories_query);

if (tep_db_num_rows($categories_query) < 1)

echo ('No database entry found<br>');

 

$lInfo_array = array_merge($links, $category);Save it and update your browser. Do you get the error displayed?

 

Jack

 

Then he came back with this answer:

 

peteruittilburgJun 30 2006, 10:59 PM

QUOTE(Jack_mcs @ Jun 30 2006, 01:27 PM)

 

Save it and update your browser. Do you get the error displayed?

 

Jack

 

 

Hi Jack,

 

Please see my posting 508.

It is an PHP4 versus PHP4 problem

 

How does one find this? My eyes hurt, Ive probably blinked and missed it.

 

Thanks

Share this post


Link to post
Share on other sites

The problem is that your version of php isn't seeing the arrays as arrays. A fix that might work is that you change this line (or whicheve one is giving the error)

$lInfo_array = array_merge($links, $category);

to this

$lInfo_array = array_merge((array)$links, (array)$category);

 

Jack

Share this post


Link to post
Share on other sites

This is mine, I changed this:

 

$Icnfo_array = array_merge($link_categories, $links_count);

 

To this:

 

$Icnfo_array = array_merge((array)$link_categories, (array)$links_count);

 

It got rid of the first error, now for the other two. Do I just stick the (array) thing in those files as well?

 

:)

Share this post


Link to post
Share on other sites

I tried it, I lost Admin & get this lovely error:

 

Fatal error: Only variables can be passed by reference in /home/wwwshop/public_html/admin/includes/classes/object_info.php on line 18

 

I get the same no matter what line I do it on. Anyway, 3am here, so Ill worry about it later 2day. I'll have another look over the threads.

 

So many people have had the same error so Im sure the fix is there somewhere. If I find it Ill post it so that people dont have to look as far back.

 

Its 1/2 fixed, anyway thanks Jack

Share this post


Link to post
Share on other sites

If you don't find a solution, please post the code you changed when you get a chance. Adding that to the code shouldn't cause a problem but it might be how or where it was added.

 

Jack

Share this post


Link to post
Share on other sites

Im still searching...searching...searching :)

 

how or where it was added! So true, I dont know what Im doing, I just give it a go & see what happens.

 

But I'll let you know. Im sure it is there somewhere.

Share this post


Link to post
Share on other sites

Hey Jack,

 

Ive been over every thread in this post. As far as I can see the fix abouve seemed to fix all three errors for others. (unless I have missed the fix for the last 2)

 

Here is what I did but it hasnt worked (I have no idea where to place the code, Im just guessing)

 

From this:

 

*/

 

class objectInfo {

 

// class constructor

function objectInfo($object_array) {

reset($object_array);

while (list($key, $value) = each($object_array)) {

$this->$key = tep_db_prepare_input($value);

}

}

}

?>

 

To this:

 

*/

 

class objectInfo {

 

// class constructor

function objectInfo((array)$object_array) {

reset((array)$object_array);

while (list((array)$key, (array)$value) = each((array)$object_array)) {

$this->$key = tep_db_prepare_input((array)$value);

}

}

}

?>

 

I just placed it on one line at a time to try it. ( all I got was errors) I didnt do all of them then save it. I just posted it like this so you can see which lines I added the (array) to.

 

Hope I haven't confused you.

 

Thanks :)

Share this post


Link to post
Share on other sites

Also, I was wondering if its possible to be able to charge listings to display in the featured link section? If so, how would one go about doing that?

 

Thanks

Share this post


Link to post
Share on other sites
Also, I was wondering if its possible to be able to charge listings to display in the featured link section? If so, how would one go about doing that?

 

Thanks

What lines of code in links manager is causing the errors now?

 

As for charging, there is nothing in the code to do that. I've played around with that idea myself but don't see a simple solution. The person to pay for the featured link would either have to pay on your shop, which means you would have to create a product for it, or just send you payment outside of the shop, say from paypal. Once payment is made, then you can control what links are featured and for how long. You would just need to track which ones have paid. That can get out of hand if you have more than a few paying and if the payment is for a certain period. To make this work in Links Manager, there would have to be additional fields added to the featured links section to track that. I have already started on a new version of Links Manager and will include this as an option if it makes sense, code wise.

 

Jack

Share this post


Link to post
Share on other sites

Its the same, I click on add catagory button and I get those last 2 errors still:

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wwwshop/public_html/admin/includes/classes/object_info.php on line 17

 

Warning: Variable passed to each() is not an array or object in /home/wwwshop/public_html/admin/includes/classes/object_info.php on line 18

 

I thought of adding the feature link as a product. Wouldnt you have to set it as a download product (so not to get charged postage)?

 

 

If the answer to the question was no (for charging) I was going to ask you if you would be able to impliment this in the future but you have already considered this so I dont have to know :)

It makes perfect sense.

Share this post


Link to post
Share on other sites
Its the same, I click on add catagory button and I get those last 2 errors still:
On the links page of the shop?

 

Jack

Share this post


Link to post
Share on other sites

No, In: Link Categories->New Category (when I click the new category button)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×