Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Define Content 1.x Support


surfalot

Recommended Posts

  • Replies 269
  • Created
  • Last Reply

Top Posters In This Topic

How would I go about making the Shipping and returns page editable?

 

Please advise.

 

first you would create a new "area", call it Shipping. Then create the content for that area in all languages applicable. Then in your shipping.php file you would find this section that (previously) would draw the information from your language files:

<?php echo TEXT_INFORMATION; ?>

and replace it with:

<?php echo tep_get_defined_content('Shipping'); ?>

 

... rinse, and repeat... ;)

Edited by surfalot
Link to comment
Share on other sites

there are 2 possible meaning to your statement.

a) the images aren't showing when the newsletter arrives at your mailbox

B) the images aren't showing when you are creating the newsletter within the WYSIWYG box.

Link to comment
Share on other sites

Both.

 

Although when I check out the image in a newsletter, it does point to just /images/xyz.gif rather than kelscrafts.co.uk/images/xyz.gif

 

Remember I posted because it was adding index.php by default to the URL path and you showed me how to eliminate it? How can I add the domain name as a prefix (and is this a good idea?)

 

Please help. You are very nice and supportive Todd (not many are, you know) ;)

Debbie Harrison

 

Link to comment
Share on other sites

might be simple. maybe not. emails & Newsletters are the only place you would want to use absolute URLs. So you would want to make a copy of the following file specifically for the newsletters. Name it whatever you wish.

external/tiny_mce/tinyMCEinit.js

 

in them, change the line:

relative_urls : true,

to

relative_urls : false,

 

Then in your newsletter script, you want to point to the new TinyMCE init script. should look like this:

<script type="text/javascript" src="external/tiny_mce/tinyMCEinit.js"></script>

 

change it to reflect the new name of your copied file above.

Link to comment
Share on other sites

relative_urls are set to false anyway and it doesn't seem to make any difference.

 

This is sad. I only wanted to add the logo and it would have been plain sailing.

 

:(

Edited by dvharrison

Debbie Harrison

 

Link to comment
Share on other sites

Hi everybody,

 

first: very nice contribution.

Almost everything works fine, except: I can't see any language for the buttons.

My Shop is german and my admin is english. I installed the german language-pack and the compressor.

- tinymce_3_2_1

- tinymce_compressor_php_2_0_2

- tinymce_lang_pack_ger

 

I can do everything (save, change etc.) but all the buttons do not show the correct names

 

See picture osc_content_define.png

 

Anybody some idea?

 

greetings from germany

 

nils

Link to comment
Share on other sites

relative_urls are set to false anyway and it doesn't seem to make any difference.

 

This is sad. I only wanted to add the logo and it would have been plain sailing.

 

:(

get my email address from the contribution docs and send me a copy of the resulting message that goes out.

Link to comment
Share on other sites

Hi everybody,

 

first: very nice contribution.

Almost everything works fine, except: I can't see any language for the buttons.

My Shop is german and my admin is english. I installed the german language-pack and the compressor.

- tinymce_3_2_1

- tinymce_compressor_php_2_0_2

- tinymce_lang_pack_ger

look for the .GZ package in the tinyMCE folder on your server. admin/external/tiny_mce/

delete it, then reload your page.

 

if that doesn't help, look for this following code in the source of the page that contains the WYSIWYG. (view source from the browser, I don't mean the php code)

  <script language="javascript" type="text/javascript">
var osc_language = 'de';
var code_protect = '';
var osc_css = '/';
var osc_images = '/admin/';
var osc_baseurl = '/';
 </script>

 <script type="text/javascript" src="external/tiny_mce/tiny_mce_gzip.js"></script>
<script type="text/javascript" src="external/tiny_mce/tinyMCEGZinit.js"></script>
  <script type="text/javascript" src="external/tiny_mce/tinyMCEinit.js"></script>

post it for me please.

Link to comment
Share on other sites

I have been looking for this for ages. Its a great idea, but how does it work. I have used phpmyadmin ti import the neccessary sql files into my main databse, then uploaded all the required files, tinyMCE etc.

 

When I open store admin everyting looks exactly like it did before - I can't see anything different that will allow me to do any of content management you are suggesting I should be able to do?

 

Any ideas??

Link to comment
Share on other sites

Thanks Todd, I've sent 2 - one showing the images (or lack of) and the issue I had with an external link.

find this at the top of the code page:

  <script language="javascript" type="text/javascript">
var osc_language = '<?php echo $lang_code; ?>';
var code_protect = '<?php echo ($define_content_protected==false?',codeprotect':''); ?>';
var osc_css = '<?php echo DIR_WS_CATALOG; ?>';
var osc_images = '<?php echo DIR_WS_ADMIN; ?>';
var osc_baseurl = '<?php echo DIR_WS_CATALOG; ?>';
 </script>

make this change:

  <script language="javascript" type="text/javascript">
var osc_language = '<?php echo $lang_code; ?>';
var code_protect = '<?php echo ($define_content_protected==false?',codeprotect':''); ?>';
var osc_css = '<?php echo DIR_WS_CATALOG; ?>';
var osc_images = '<?php echo DIR_WS_ADMIN; ?>';
var osc_baseurl = '<?php echo HTTP_SERVER; ?>';
 </script>

or this:

  <script language="javascript" type="text/javascript">
var osc_language = '<?php echo $lang_code; ?>';
var code_protect = '<?php echo ($define_content_protected==false?',codeprotect':''); ?>';
var osc_css = '<?php echo DIR_WS_CATALOG; ?>';
var osc_images = '<?php echo DIR_WS_ADMIN; ?>';
var osc_baseurl = '<?php echo HTTP_SERVER.'/'; ?>';
 </script>

Link to comment
Share on other sites

I have been looking for this for ages. Its a great idea, but how does it work. I have used phpmyadmin ti import the neccessary sql files into my main databse, then uploaded all the required files, tinyMCE etc.

 

When I open store admin everyting looks exactly like it did before - I can't see anything different that will allow me to do any of content management you are suggesting I should be able to do?

 

Any ideas??

 

if everything was installed correctly, you should have a new menu option in your admin menu called Define Content.

in there you will find tools to create "areas" and "content" for those areas. After you have created an area (just a name really), and content for that area (in multiple languages if required).

 

Lets say you created an area called "Terms of Service", and added content to that area.

 

After that you would open your terms of service page and add the following code where you want the content to display:

<?php echo tep_get_defined_content('Terms of Service'); ?>

 

does that help?

Link to comment
Share on other sites

  • 1 month later...

GREAT Contribution here

 

Has anyone been able to get this working with the STS Contribution?

 

I had installed newest release of OSCommerce and was able to install this very easily on 3 occassions. However I found that one of the Contributions wasn't very compatible with the newest release of OSCommerce so I went back to the oscommerce-2.2ms2-060817 release.

 

Since then I was able to install the 2 main mods I wanted Gift Registry and CCGV(trad). Then realized I needed the Admin Secure Login contribution. Got that and installed it then installed latest release of STS.

 

I installed Define Content last night and now in the admin Panel under the Define Content section I have this error message:

Fatal error: Call to undefined function tep_hide_session_id() in /home/mydomain/public_html/admin/define_content.php on line 434

 

Clip from my EditPlus utility I use shows Line 434 code as such:

<?php echo tep_draw_form('delete_define_content', FILENAME_DEFINE_CONTENT, '', 'GET') . tep_draw_hidden_field('action', 'define_content_insert') . tep_hide_session_id(); ?><td align="right" class="smallText"><?php echo ($WYSIWYG_on==true||$FCK_WYSIWYG_on==true?str_replace('>',' id="usewysiwyg_insert" style="cursor: pointer;">',tep_draw_checkbox_field('usewysiwyg', 'true', ($_COOKIE['dfusewysiwyg']=='true'?true:false))) . ' <label for="usewysiwyg_insert" title="' . DEFINE_CONTENT_USE_WYSIWYG . '">' . DEFINE_CONTENT_USE_WYSIWYG . '</label>':'') . '  ' . tep_image_submit('button_insert.gif', DEFINE_CONTENT_INSERT_ITEM_TITLE, ''); ?> </td></form>

 

Now if I click on one of the Sections to be edited I do not get the wysiwyg editor and get this error:

Fatal error: Call to undefined function tep_hide_session_id() in /home/mydomain/public_html/admin/define_content.php on line 248

 

Line 248 from my EditPlus is:

<tr><?php echo tep_draw_form('define_content', FILENAME_DEFINE_CONTENT, ((!empty($_GET['usewysiwyg']))?'usewysiwyg='.$_GET['usewysiwyg'].'&':'') . (($_GET['action']=='define_content')?'define_content_id='.$input_content_id.'&action=save':'action=insert'), 'post', 'enctype="multipart/form-data"') . tep_hide_session_id(); ?>

 

I am not really sure what is generating these errors. Again as stated I was successful in installing this great contribution before on the most current release of OSCommerce, but had to downsize to an earlier release to use the 2 main contributions I Wanted.

 

Thanks for any help on this matter as it is greatly appreciated.

 

ROn

Edited by RSprinkel
Link to comment
Share on other sites

OK Update - This has nothing to do with the STS Contribution. What I did was delete the whole directory structure on my server and reverted back to a back up of the original backup I made using the OSCommerce vers of oscommerce-2.2ms2-060817 with the following contributions only: CCGV, Gift Registry, Notify Registry and Manage Registry.

 

I am getting the exact same errors as listed above

 

So I am guessing this Define Content Vers is NOT compatible with the OSCommerce version I am using.

 

Can someone confirm this?

 

Thanks

Edited by RSprinkel
Link to comment
Share on other sites

Ok I have found out that the current vers of Define Content is NOT compatible with this version of OSCommerce oscommerce-2.2ms2-060817. AS I have started from scratch ONCE again.

 

I have since downloaded 1.3b and installed it since it said it was a complete package. FOLLOWED every instruction to the "T" as I have been doing. Downloaded and installed newest vers of TinyMCE and the compressor placed all files in their respective folder. Now everything seems to work other then the fact of the Editor does not show. I have checked the "Use WYSIWYG editor" checkboxes and everything and still no go. I do have a Javascript error in the bottom of IE 7.

 

One states "TinyMCE" is null or not an objsct

 

The other one states - Could not complete the operation due to error 80020101

 

This is getting very frustrating.

 

PLEASE Help I have been working on getting this contribution going for 2 days now.

Link to comment
Share on other sites

the newest version of Define Content (1.4) is the only version that works with the newest version of tinyMCE (3.x). the previous version of Define Content (1.3b) only works with tinyMCE 2.x. I don't see that the tinyMCE folks are keeping the old versions on sourceforge any longer, but I can give one to you. Also, someone has posted the tinyMCE version 2.0.8 here in the contributions (some assembly required)

 

the better option is to use the latest version of Define Content, the latest version of tinyMCE and remove the references to the function: tep_hide_session_id()

 

That functoin doesn't exist in the versions of osCommerce previous to the RCx version. You can also get that function from the newest version of osCommerce and install it. Either way it should work fine.

 

Hope that helps

Edited by surfalot
Link to comment
Share on other sites

Hi Todd

 

Your contribution is so good i've added it to another one of my sites. however, on this occasion the content areas have been duplicated:

 

Please help. Thanks in advance

 

looks like you ran the SQL twice.

 

Empty the define_content and define_content_description tables and run the content and content areas SQL scripts again.

Edited by surfalot
Link to comment
Share on other sites

  • 2 months later...

Hi Todd, I need your help again. I got a problem with "define content" and character encodings.

 

I have define content and tinymce installed and everything was working perfectly. I'm using it for both, product descriptions and other pages, like "contactus" etc. Recently I changed everything to Utf-8, since then I was using iso-8859-7 for my greek site

 

After this change, it happens following:

 

1) The text appears normally on the site and thats fine. Example: "Μην διστάζετε να επικοινωνήσετε μαζί μας"

 

2) When looking at the page source, I see instead of this following: "<p><strong>Μην διστάζετε να επικοινωνήσετε μαζί μας.</strong></p>"

 

3)Writing the same text, but without the Tinymce, I can see everything correctly everywhere, but then I don't have the formatting I want

 

An example of what I mean you can see here

 

What am I doing wrong? Where to search?

Link to comment
Share on other sites

Hi again

 

I did the test.php thing, as described in post117 and here are the results:

 

For catalog/test.php

 

$lng is set

languages from object:

el Array ( [id] => 5 [name] => Greek [image] => gricon.gif [directory] => greek )

en Array ( [id] => 1 [name] => English [image] => icon.gif [directory] => english )

de Array ( [id] => 2 [name] => Deutsch [image] => icon.gif [directory] => german )

 

for catalog/admin/test.php

setting $lng now

languages from object:

el Array ( [id] => 5 [name] => Greek [image] => gricon.gif [directory] => greek )

en Array ( [id] => 1 [name] => English [image] => icon.gif [directory] => english )

de Array ( [id] => 2 [name] => Deutsch [image] => icon.gif [directory] => german )

 

languages from tep_get_languages:

Array ( [0] => Array ( [id] => 5 [name] => Greek

 => el [image] => gricon.gif [directory] => greek ) [1] => Array ( [id] => 1 [name] => English [code] => en [image] => icon.gif [directory] => english ) [2] => Array ( [id] => 2 [name] => Deutsch [code] => de [image] => icon.gif [directory] => german ) )

 

Greek is my default language.

 

I don't know if this help

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