Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Javascript InfoBox v1.1


clarocque

Recommended Posts

Thanks for the links; couple of quick questions:

1) Does this affect your keyword ranking on the major engines - as it is most likely going to be keywords you are using, surely this now puts these words inside javascript tags which engines ignore...?>!

2) Is there a way to get this to work on non-database code? Ideally I would like it to pick out every instance of a keyword anywhere on my site and change it to the desired popup explanation? Any ideas, or is there a way of shoving my current page code into the database only to pulll it back out again re-scripted with phpLib.....?

 

(please bear in mind my complete ignorance, if the above question is completely dumb, sorry!)

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Link to comment
Share on other sites

Thanks for the links; couple of quick questions:

1) Does this affect your keyword ranking on the major engines - as it is most likely going to be keywords you are using, surely this now puts these words inside javascript tags which engines ignore...?>!

 

The javscript box content is in javascript but the trigger to the javscript is a hyperlink on the page. I dont know that search engines do or don't ignore hyperlinks which is what the replace word is. I'll leave that for someoen else to comment on.

 

2) Is there a way to get this to work on non-database code? Ideally I would like it to pick out every instance of a keyword anywhere on my site and change it to the desired popup explanation? Any ideas, or is there a way of shoving my current page code into the database only to pulll it back out again re-scripted with phpLib.....?

 

Yes, non-database code can be used if you use the manual code option in the contribution.

 

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

There is talk among the SEO crowd that speculates spiders are getting smarter. As an example, Google is now able to index other content than traditional HTML files like PDF, DOC, XLS, PPT, MPEG, AVI, etc. A side argument is that spiders will quickly or currently have the ability to index JS content for pages.

 

There are many websites that use JS popups for information and this is well known by search engine algo engineers. It is speculated that this content will add to the page value once it becomes standard. As usual Google leads the way with technological innovation...the rest are sure to follow.

 

Bobby

Link to comment
Share on other sites

OK, probably answered my own question here, as Google have just indexed all of my popup_image pages, which is also in a javascript link, so I'm fairly ceratin that this would be fine. A little annoying, as I am now adding extra links to my popup image pages for those customers who have found my images from a Google search and at present they cant get to the rest of my site.....extra visitors though...every cloud has a silver lining I suppose. (I have also just included popup_images in my no-no list in robots.txt to stop this from happening again, bandwidth can disappear very easily if robots are going through my images.....!!)

 

Anyway, thanks again for some excellent coding and avery easy install. I am certain this will add great value to my site, and that many other site owners will find it useful for them too.

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Link to comment
Share on other sites

  • 2 months later...

Hello,

 

I recently added the js_infobox contribution to my store but I had several problems and maybe someone could explain.

 

1. catalog\admin\js_infobox.php uses the various field-variables like $width, $height etc to initiate updates or additions to mysql dbase. Now I cannot see how these vars are initialized. Is there another file with this contribution that was not included in the latest package? So I had to create an array and initialize all fields using HTTP_POST_VARS and then pass this array to the dbase. That seems to work pretty much like the categories and products.

 

2. If I change the catalog\application_top.php with the js mods when the jsib class is instantiated the language id is not yet set. Maybe that was different between the oscommercse versions? I am using 2.2ms2. I had to move the code from the application_top.php below the language declaration in the individual files like index.php and product_info.php.

 

3. The code that initializes the overlib script in the footer.php didnt always worked. I saw the function overlib() will return right away because olLoaded wasnt set. This happens when I clicked the js links before the page completed loading 100%. I had to change the code so if olLoaded is false the function re-initializes all globals and event listeners and returns false. That made it work.

 

I still have other problems that I havent debuged but just in case some files are missing or install instructions it could save some time. The javascript code when you hit cancel in the admin js box to exit the box settings shows errors and does not exit. I have to hit back on the browser.

 

Thanks

Link to comment
Share on other sites

Hello,

 

I recently added the js_infobox contribution to my store but I had several problems and maybe someone could explain.

 

1. catalog\admin\js_infobox.php uses the various field-variables like $width, $height etc to initiate updates or additions to mysql dbase. Now I cannot see how these vars are initialized. Is there another file with this contribution that was not included in the latest package? So I had to create an array and initialize all fields using HTTP_POST_VARS and then pass this array to the dbase. That seems to work pretty much like the categories and products.

 

2. If I change the catalog\application_top.php with the js mods when the jsib class is instantiated the language id is not yet set. Maybe that was different between the oscommercse versions? I am using 2.2ms2. I had to move the code from the application_top.php below the language declaration in the individual files like index.php and product_info.php.

 

3. The code that initializes the overlib script in the footer.php didnt always worked. I saw the function overlib() will return right away because olLoaded wasnt set. This happens when I clicked the js links before the page completed loading 100%. I had to change the code so if olLoaded is false the function re-initializes all globals and event listeners and returns false. That made it work.

 

I still have other problems that I havent debuged but just in case some files are missing or install instructions it could save some time. The javascript code when you hit cancel in the admin js box to exit the box settings shows errors and does not exit. I have to hit back on the browser.

 

Thanks

 

 

1...What version are you using? I dont know of a js_infobox.php page

 

2... Instructions said tyo add this after the language settings...

 

I would recheck how you installed it.. these are not problems I know of anyone wles having.

 

Chris

osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Link to comment
Share on other sites

1...What version are you using?  I dont know of a  js_infobox.php page

 

2... Instructions said tyo add this after the language settings...

 

I would recheck how you installed it.. these are not problems I know of anyone wles having.

 

Chris

 

Hi Chris,

 

Yes no1 it should read js_infobox_manager.php. So if understand with the original code in the admin directory these variables like $height, $width etc do not initialized but then when I tried to save an entry; if you see at the beginning of the file is where the $action is processed (That variable wasnt also set) the code wouldn't save anything. The first thing I had to do to make it work was setup the $action like this:

$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

Then I could add entries but their attributes wouldn't get set until I setup an array and initialized the main fields.

     $sql_data_array = array('find_replace' => tep_db_prepare_input($HTTP_POST_VARS['find_replace']),
                             'find_word' => tep_db_prepare_input($HTTP_POST_VARS['find_word']), ....etc

In my case the tep_db_query("insert into jsib....etc statements did not alter the dbase. because these variables were not set.

 

Ok about the language, that was my problem because of the admin issue it wouldn't store the language correctly. I just retested that.

 

Yes I noticed you changed the footer.php to add the script to handle the user input. What I was seeing if I click the js links before the page finish loading it will not work. So I had to re-initialize it as I mentioned on 3.

 

Regards

Link to comment
Share on other sites

  • 2 months later...
If you are interested in an example of the great contribution look at our webpage

 

Until now some examples are implemented in the german sites, for example look at the freight tables, which need some extra explanations for different countries (Switzerland-Schweiz, or Norway-Norwegen)

 

but I'll complete our databased product infos with much further information...

 

greetings from Germany,

Philipp

hi

 

i have looked at the site an noticed straight away that once the english language option was selected the javascript effect was lost -can this be modified to have language selection using the language files?

 

thanks

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Link to comment
Share on other sites

  • 2 weeks later...
hi

 

i have looked at the site an noticed straight away that once the english language option was selected the javascript effect was lost -can this be modified to have language selection using the language files?

 

thanks

 

Hallo,

the problem is fixed, you just have to generate at least one "manual code" in every admin language (means you have to do that logged in as ADMIN in english first, then in german and ...). In the language files there has to be included some manual code too (which is generated by the contribution).

Further the "Define Additional Dynamic Pages" must be filled with the filenames, where the javascript-effect should be visible.

 

regards Philipp

greetings from Germany

 

Philipp

Link to comment
Share on other sites

  • 7 months later...

How do you use the manual code?

 

Right, this is a fine contribution and the standard find and replace works superb in the product descriptions in product_info.php.

 

What I'm having problems with is the manual code part. I am trying the manual code but it doesnt seem to work.

 

There is a part where I want the put the words "Price Match" under the price (not in the product description) then use the Javascript popup to open up when "Price Match" is clicked and then open the link to the price_match.php (passing the $product_id) on the way if possible.

 

According to the instructions i have placed the comment <! --Price Match--> in the product_info.php

 

In the settings I have:

 

* ticked "use manual code"

* Pages: product_info.php

* Link: price_match.php?products_id=$HTTP_GET_VARS['products_id']

 

Now when I load the page "price match" doesnt appear but when i view the source I can see <! -- Price Match--> comment.

 

So I'm asking if someone can enlighten me how to use the manual code correctly

 

Thanks

 

Simon

Link to comment
Share on other sites

  • 4 months later...

Hi there,

 

I just installed this contribution, and I would really like to get it to work, as it seems like just what I need.

 

I can't get anything to show, and I wonder if it can be because I have sts on my site???

 

Have anybode got this to work with sts?

It seems fine in admin, but I can't get anything to show on my site.

Since I have sts, my files look a little different than the standard osc files, f ex. in product_info page and footer.php I could not find the code to change in regards to the installationprocedure, or the code in my fil look a little different, so I had to guess where to do the change.

 

I also tried to define the new $jsinfobox in the sts files, but still did not work. I'm not sure I've done it right though.

 

 

Any help greatly appreaciated :-)

 

Thanks,

Best regards

Kjolebutikken

Link to comment
Share on other sites

  • 2 years later...

hello, this is a nice contribution as i can see it on the screenshots. unfortunately the js_infobox_manager.php doesn't fill my database-fields. i think there is an compatibility-issue with php 5.2?. at the moment i've to fill in the database with phpmyadmin. it would be nice if somebody could fix the file.

Edited by sak1981
Link to comment
Share on other sites

  • 1 month later...

Can someone please update this to work with latest oscommerce and php!! It doesn't insert the data into the database like it should. Only way to get it to work is into manually insert the data in the database (as stated above).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...