Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Define Content 1.x Support


surfalot

Recommended Posts

back to this one again ..

 

Installed, works perfectly

Tried to include TinyMCE - UH OH! With or without 'use WYSIWYG editor' checked I still do not see TinyMCE.

 

Paths checked, double checked and triple checked but nothing.

 

Suggestions anyone?

SolarFrenzy

Solar powered gadgets at down to earth prices.

 

CheekyNaughty

Promoting British Design

Link to comment
Share on other sites

  • Replies 269
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 months later...

Thanks for this fantasic contribution. I installed it and everything works great except for the image uploader. I get an error when I click 'Browse server' on the 'Image Properties' pop up. The error window that pops up says it can't find the file "admin/includes/javascript/FCKeditor/editor/filemanager/browser/default/connectors/php/connector.php" which is understandable because the file resides here "admin/includes/javascript/FCKeditor/editor/filemanager/connectors/php/connector.php" I have looked everywhere to try and find the solution but I can't even find the path so I can correct it. Any Suggestions?

 

Also, I would like to use this contribution to add content to some resource pages in the admin site. Is there a way to use this contribution to do this from one location or do I need to install a second instance of it and change all the files so they point to the admin site?

 

Thanks in advance for any help you can offer.

Link to comment
Share on other sites

  • 3 weeks later...

Same issue here.

 

No problems at all wth Define Contant which is a superb contribution - but no joy with Tiny_MCE.

 

I've downloaded the latest version tiny_mce 3_1_0_1 and then uploaded it to admin/includes/javascript/

 

I then uploaded the files in the contribution to admin/includes/javascript/

 

I get the usual symptoms.

The edit with WYSIWYG button on the main define content page, and when I try to edit an isert, I get the Hide WYSIWYG button but no edit bar for tiny_mce

 

clicking the Hide WYSIWYG button doesnt do anything at all!

 

If anyone has worked out what this problem is I'd love to know the answe!

 

thanks

Link to comment
Share on other sites

  • 3 months later...

Hi Todd.

 

After additional images, I installed aso the "define content" and everything is great, thank you very much.

 

Now an issue with the contribution "HeaderTags SEO V3", in file /includes/header.php

 

1) According to their instruction the line

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>

 

needs to be replaced by

 <?php /*** Begin Header Tags SEO ***/ ?>
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', (tep_not_null($header_tags_array['logo_text']) ? $header_tags_array['logo_text'] : STORE_NAME)) . '</a>'; ?></td>
<?php /*** End Header Tags SEO ***/ ?>

 

2) This line don't exist anymore in my header.php, because the lines

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>
<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">

 

are replaced because of define content by

<?php // BOF: Define Content ?><?php echo tep_get_defined_content('Page Header'); ?><?php // EOF: Define Content ?>

 

3) Because I want to use both contributions, I lest the "Define content" line as it was and I added

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
<?php /*** Begin Header Tags SEO ***/ ?>
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', (tep_not_null($header_tags_array['logo_text']) ? $header_tags_array['logo_text'] : STORE_NAME)) . '</a>'; ?></td>
<?php /*** End Header Tags SEO ***/ ?> 
<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">

 

into the "header definition" og define content in the admin panel

 

Because I don't really know how all this works, I'm just trying to discover it, my question is if I did correctly or what i did is just a stupidness

Link to comment
Share on other sites

looks OK to me.

 

Just to restate the obvious... HTSEO is simply adding a definable ALT text to the header image. Since Define Content moved the header image block of code into the admin, all you need to do is change the code in the Define Content admin instead of the php page as you did.

 

The only thing that concerns me is the extra line at the bottom that is the beginning of a new <table> tag. For organizational concerns, it shouldn't be in the Define Content. It should be in your php page since it will leave an incomplete block of HTML in your Define Content.

Link to comment
Share on other sites

  • 1 month later...

Hi Todd

 

Great contribution. I have just followed install.txt religiously. Ran SQl queries like you said and uploaded the 1 file to upload and followed the paths exactly.

(basically I folowed steps 1a, b and c and 2. I didn't upload 2 files to upload as this website is nearly fully working.

 

Anyway I checked to see if I could access define content from the admin panel as said:

 

** Basic Installation is done. You can manage the content in the osCommerce admin

** Go to the Define Content main menu item in your osCommerce admin. You can edit

** any example items and create your own.

 

I've tried and I basically can't find it anywhere. I would like to add the WYSIWYG editor as the site owner would probably need it but as I am following the instructions religiously I cannot work out what I have done/am doing wrong.

 

All the SQLs reported as executing successfully so please could you shed some light. I can provide passwords etc if you PM me.

 

Many thanks in advance,

Debbie Harrison

 

Link to comment
Share on other sites

I now do have a problem. I have installed TinyMCE following all the instructions (stages 1-6) and uploaded everything as it should be. I have also checked the define_content.php which has the class entered as implied:

 

<td class="main"><?php echo tep_draw_textarea_field('define_content_description_text', 'off', '100', '25', stripslashes($define_content['define_content_description_text']),((!empty($_GET['usewysiwyg']) && $_GET['usewysiwyg']=='true' && $WYSIWYG_on==true)?'class="TinyMCE" ':'').'id="define_content_description_text"'); ?></td>

 

However I have no pop-up or any indication of an editor on the admin page.

 

sshot.gif

 

Basically all I want to do is be able to edit the main content on the homepage (because we hold monthly prize draws and announce the winner).

 

GZIP does work on my server as does PHP and JavaScript. Please could you shed some light.

 

Many thanks in advance

Edited by dvharrison

Debbie Harrison

 

Link to comment
Share on other sites

  • 3 weeks later...

I have everything installed, but I'm getting an error on categories.php. Despite this error, everything seems functional.

 

Warning: Variable passed to each() is not an array or object in /home/oarfegcr/public_html/new/admin/categories.php on line 345

 

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/oarfegcr/public_html/new/admin/categories.php on line 348

 

Does anyone have a clue how I can fix this?

Thanks!

Link to comment
Share on other sites

at the top of /new/admin/categories.php, find this code:

  if (!$lng) {
include(DIR_WS_CLASSES . 'language.php');
$lng = new language();
 }

replace with this:

  if (!$lng) {
echo '$lng not defined, including: ' . DIR_WS_CLASSES . 'language.php';
include(DIR_WS_CLASSES . 'language.php');
$lng = new language();
 }
echo '<br><pre>';
print_r($lng);
echo '</pre><br>';
exit;

reload the page and post what it displayed.

change it back.

Link to comment
Share on other sites

I have get the following error message adding the module to the Newsletter manager.

 

1146 - Table 'kelscrafts_co_uk_products.TABLE_CUSTOMERS_TEMP' doesn't exist

 

select * from TABLE_CUSTOMERS_TEMP

 

[TEP STOP]

 

I followed the example in the WYSIWYG_editor_addition.txt, added the code between the <head></head> tags and added

 

tep_draw_textarea_field('content', 'soft', '100%', '20', $nInfo->content, 'class="TinyMCE"');

 

onto the appropriate line as laid out. I can create the newsletter and preview and lock it, but once I try to send, I get that.

 

I had just configured Tiny_mce to

relative_urls : false,
in the init.js files, but reverting this back to true makes no difference.

 

Please help.

Edited by dvharrison

Debbie Harrison

 

Link to comment
Share on other sites

Actually thinking about it, I also use http://addons.oscommerce.com/info/5196 so visitors can subscribe to the newsletter without buying something.

 

This is probably the spanner in the works. Is there a way around this?

 

TIA :blush:

Edited by dvharrison

Debbie Harrison

 

Link to comment
Share on other sites

Actually thinking about it, I also use http://addons.oscommerce.com/info/5196 so visitors can subscribe to the newsletter without buying something.

 

This is probably the spanner in the works. Is there a way around this?

 

TIA :blush:

 

I don't think this error or issue relates to the Define Content contribution. Looks like a problem with the other contribution.

Link to comment
Share on other sites

Does this contribution work with STS?

 

as long as you understand how sts works, so that you are putting the define content code in the correct places, I would have to guess that it would.

Link to comment
Share on other sites

Hello,

 

Thanks for providing us this useful contribution.

 

I have installed "Define Content 1.4".

 

Everything is working fine.

 

<?php echo tep_get_defined_content('About Us'); ?>

shows up the About Us content correctly.

 

But the same code inside a define is showing a error message.

 

In the language file, we have the following codes:

// page title
define('TITLE', ''. STORE_NAME .'');

define('DESCRIPTIONS', 'tep_get_defined_content('Store Description');');

define('KEYWORDS', ''. STORE_KEYWORDS .'');

 

STORE_NAME and STORE_KEYWORDS show up the configuration_value correctly.

 

But the code in the DESCRIPTIONS is showing the following error message;

Parse error: syntax error, unexpected T_STRING in /home/celextel/domains/lodhajewellery.in/public_html/includes/languages/english.php on line 53

 

Kindly let us know as to how to show up the tep_get_defined_content inside the defines.

 

Thanks,

 

Lakshmanan

Link to comment
Share on other sites

it might work better if you did it like this:

 

define('DESCRIPTIONS', tep_get_defined_content('Store Description'));

 

But I'm not sure if that will really work at all. I'm not sure you can use a function to define a constant. I know there are some restriction there. It also partially depends on whether the language file is being loaded before or after the define content include.

 

The intent was that you place tep_get_defined_content('Store Description'); in the locations (in place of) where you would be placing the DESCRIPTIONS constant, and not as a dynamic content for a constant (DESCRIPTIONS).

Link to comment
Share on other sites

it might work better if you did it like this:

 

define('DESCRIPTIONS', tep_get_defined_content('Store Description'));

 

But I'm not sure if that will really work at all. I'm not sure you can use a function to define a constant. I know there are some restriction there. It also partially depends on whether the language file is being loaded before or after the define content include.

 

The intent was that you place tep_get_defined_content('Store Description'); in the locations (in place of) where you would be placing the DESCRIPTIONS constant, and not as a dynamic content for a constant (DESCRIPTIONS).

 

Thanks. It is showing up correctly now.

 

We have made the define content to load before the language file in the application_top.php.

 

Thanks.

Link to comment
Share on other sites

Hi Todd

 

I have one minor bug on the installation: Basically when I add an image using the drop-down image list, the first time it doesn't list the image because it adds index.php/images/etc on the path given.

 

Is there a way I can override this so it just goes to the /images/ folder? :lol:

Debbie Harrison

 

Link to comment
Share on other sites

Hi Todd

 

I have one minor bug on the installation: Basically when I add an image using the drop-down image list, the first time it doesn't list the image because it adds index.php/images/etc on the path given.

 

Is there a way I can override this so it just goes to the /images/ folder? :lol:

 

couple ideas for you...

 

first try this change, same change in both of these files:

catalog/admin/external/tiny_mce/tinyMCEinit.js

catalog/admin/external/tiny_mce/tinyMCEinit_strict.js

 

find the line:

		document_base_url : osc_baseurl + "index.php",

 

change to:

		document_base_url : osc_baseurl,

 

if that doesn't work, try this. In file:

catalog/admin/tinymce_images.js.php

 

find the line:

	  $output .= '["'.$name.'", "'.$file.'"]'.(($sz==$c)?'':','."\n" );

 

change to:

	  $output .= '["'.$name.'", "'.DIR_WS_CATALOG.$file.'"]'.(($sz==$c)?'':','."\n" );

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...