Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Krika News V1.1


nicko107

Recommended Posts

Hello

 

Because I don?t find any "official" forum support for this contribution I create this.

 

I upload new version:

 

Krika News v1.1

 

Can download at:

 

http://www.oscommerce.com/community/contributions,2144

 

 

FEATURES:

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

 

This contribution add a new module for main page of catalog for display news, have a editor in admin section, and can select to active or not active the module in admin page.

 

 

This version add:

 

- Added Tiny_mce wysiwig HTML editor based in contribution:

*TinyMCE WYSIWYG HTML EDITOR by Sputnik77

http://www.oscommerce.com/community/contributions,4563

(that contribution replace all textareas of catalog by the tiny_mce editor. Thanks for this great contribution!)

Which this editor can published more easy the content of news in Krika News module in admin section.

Some browser navigators have disable the javascripts and don?t display this editor, can enable it in options of your browser only for admin. In the case that are disable javascript only display in textarea mode without Tiny_mce editor.

- Rewriter of instrucctions.

 

- Include the option to used the scroll version, create by Pablo Encabo www.plasticoymetal.com

 

 

DEMO:

-------

http://www.oscommerce-demo.com/demo01/

 

 

 

Include screenshots of module and admin page to active the module and edit news.

Include a folder with all files that modified this contribution to upload to news shops without modifications in his files.

Instructions in english and spanish

And a version with scroll in news.

Instructions to easy update for olders versions to this version 1.1

Link to comment
Share on other sites

  • 2 weeks later...
Thanks for a great contribution!

 

Please advise how to code the news into a (right or left) box.

 

Thanks!

 

 

Hi

 

do this:

 

first create a file called news.php

 

with this code:

 

<?php
/*
 $Id: news.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- news //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => TABLE_HEADING_NEWS);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => TEXT_NEWS);

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- news_eof //-->

 

 

upload to catalog/includes/boxes/news.php

 

and edit file catalog/includes/column_right.php or column_left.php

 

and add:

 

require(DIR_WS_BOXES . 'news.php');

 

 

and have the news in a infobox

Link to comment
Share on other sites

Thank you!

 

I figured it out myself in the end, and just when I was about to post the solution, got your forum message...

 

Thank you anyway!

 

:)

 

Hi

 

do this:

 

first create a file called news.php

 

with this code:

 

<?php
/*
 $Id: news.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- news //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => TABLE_HEADING_NEWS);

 new infoBoxHeading($info_box_contents, false, false);

 $info_box_contents = array();
 $info_box_contents[] = array('text' => TEXT_NEWS);

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- news_eof //-->

upload to catalog/includes/boxes/news.php

 

and edit file catalog/includes/column_right.php or column_left.php

 

and add:

 

require(DIR_WS_BOXES . 'news.php');

and have the news in a infobox

Link to comment
Share on other sites

One more thing, though...

When inserting an image, the URL printed into English_news.txt contains slashes and "", therefor, the image not appearing on the page.

 

I know there's a remove slashes command, but don't know where to apply it on... :blink:

Link to comment
Share on other sites

One more thing, though...

When inserting an image, the URL printed into English_news.txt contains slashes and "", therefor, the image not appearing on the page.

 

I know there's a remove slashes command, but don't know where to apply it on... :blink:

 

I'm too hasty today...

 

Here's the code (on action_news.php):

<?php 
/* 
La variable $nombre contiene el path y nombre del archivo txt.
La variable $textonoticias es la que contiene la noticia 
*/

if ($fp=fopen ($nombre,'w')) 
 {
 fwrite($fp,stripslashes($textonoticias));
 echo '<b>' . EXIT_FINISH . '<br>';
 echo NAME_FILE_FINISH . $nombre . '</b>';
 }
else { echo ERROR_WRITE_FINISH; }

fclose($fp); 

?>

Link to comment
Share on other sites

  • 4 weeks later...

Hi

 

About the problems with display images if possible that Tinymce need be configure the relative urls, there information in this links:

 

http://tinymce.moxiecode.com/tinymce/docs/...ative_urls.html

 

changing relative urls to false, is true by default

 

 

and document_base_url

 

http://tinymce.moxiecode.com/tinymce/docs/faq.html#paths

 

http://tinymce.moxiecode.com/tinymce/docs/...t_base_url.html

Link to comment
Share on other sites

  • 3 weeks later...

i installed this contri and everything works fine, the txt file does get displayed in the shop.. but when i go to the news posting section in the admin i see this error where tinymce should be:

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in httpdocs/catalog/admin/edit_news.php on line 92

 

this is on line 92 in edit_news.php:

 

$num_filas=mysql_num_rows($query);

 

does anybody know what could be wrong?

Link to comment
Share on other sites

  • 3 weeks later...

HI,

I've copy all catalog files on this contrib,and follow all instructions in installation note,

I can see 'BOX_TOOLS_NEWS' option under 'tools' in admin.

but when I click those BOX.. button I got this error msg :

Not Found
The requested URL /catalog/admin/FILENAME_EDIT_NEWS was not found on this server.

Link to comment
Share on other sites

  • 1 month later...
Hi

 

About the problems with display images if possible that Tinymce need be configure the relative urls, there information in this links:

 

http://tinymce.moxiecode.com/tinymce/docs/...ative_urls.html

 

changing relative urls to false, is true by default

and document_base_url

 

http://tinymce.moxiecode.com/tinymce/docs/faq.html#paths

 

http://tinymce.moxiecode.com/tinymce/docs/...t_base_url.html

 

This TinyMCE is crap...couldnt fix the urls....:(

 

I hadnt any problem to make live the HTMLAREA, but I'm rookie in this... :(

 

I suggest to change to HTMLAREA ! ;)

Link to comment
Share on other sites

  • 1 month later...
I'm too hasty today...

 

Here's the code (on action_news.php):

<?php 
/* 
La variable $nombre contiene el path y nombre del archivo txt.
La variable $textonoticias es la que contiene la noticia 
*/

if ($fp=fopen ($nombre,'w')) 
 {
 fwrite($fp,stripslashes($textonoticias));
 echo '<b>' . EXIT_FINISH . '<br>';
 echo NAME_FILE_FINISH . $nombre . '</b>';
 }
else { echo ERROR_WRITE_FINISH; }

fclose($fp); 

?>

 

This actualy helped on all the formating issues too. Now red text does'nt appear green and blue text does'nt appear as black size 38 and so on.

I thank you alot for this fix!

Link to comment
Share on other sites

  • 1 month later...

:( STS v4.5 working with Krika news v1.1 ?, Anyone have this woring together ?

 

Installing both together gives me the follwoing error:

 

Fatal error: Cannot instantiate non-existent class: noborderbox in /home/content/html/catalog/includes/modules/news.php on line 31

Edited by sandy817
Link to comment
Share on other sites

:( STS v4.5 working with Krika news v1.1 ?, Anyone have this woring together ?

 

Installing both together gives me the follwoing error:

 

Fatal error: Cannot instantiate non-existent class: noborderbox in /home/content/html/catalog/includes/modules/news.php on line 31

Link to comment
Share on other sites

  • 3 months later...

Sorry my English! Living in denmark!

 

Can somebuddy tell me why I cant use external links in my Kirika News? See the bottom of http://www.osce.pcv.dk

 

My domain name has been auto insert before the link I insert i Kirika news....

 

How to solve this???? Please!!!

 

Is it possible it is in my configure files??? or?

 

 

Jens

Link to comment
Share on other sites

  • 3 months later...

Dear sir,

My name is Richard,I am so sorry write this mail to you.

I just view your http://www.oscommerce-demo.com/demo01.

 

I found the screen in your page was all filled ,even in the screen resolution of 800x600 or 1024x768 or more,

the screen was filled without horizontal scroll bars appearing.

 

Sir,I ever try to download the http://addons.oscommerce.com/info/2710 (Fixed Width Site with CSS)

 

to try modify my page, but can not success.

 

Sir,if you would like ,can you please help me to modify my website to the correct page screen like http://www.oscommerce-demo.com/demo01

I mean I want my page can be filled in all screen resolution without horizontal scroll bars appearing.

 

Sir,I would very like to pay you the charge for my thanks

 

my website was http://www.evaland.com.tw

 

Can you reply me

Thank you very much

Link to comment
Share on other sites

  • 2 months later...
HI,

I've copy all catalog files on this contrib,and follow all instructions in installation note,

I can see 'BOX_TOOLS_NEWS' option under 'tools' in admin.

but when I click those BOX.. button I got this error msg :

Not Found
The requested URL /catalog/admin/FILENAME_EDIT_NEWS was not found on this server.

 

 

Hey! Is this topic still alive?! Cause i have installed today the Krika News... and i had the exactly same message as "onlinebisne2 when i click the BOX_TOOLS_NEWS in admin area.

Anyone can help me here? Thanks

Drop the ideia of becoming someone, cause you are already a masterpiece.

Link to comment
Share on other sites

  • 1 month later...

Does anyone know how I can change the button on the publish news page i admin from Enviar to submit please ?

 

Nevermind figured it myself, For anyone else edit catalog\admin\form_noticia.php

 

line 53

<input type="submit" name="enviarpulsado" value="Enviar">

 

Replace with

<input type="submit" name="enviarpulsado" value="Submit">

 

Kind Regards

Shaun

Edited by Get-Wireless 2
Link to comment
Share on other sites

  • 2 months later...

Hello all,

 

I have been using this wonderful mod for a year and suddenly today it just doesnt show up on the site.....disappeared.

 

In the admin section it is there and I can edit the news etc, but it just wont appear on the site.

 

Is this any issue with upgrade of PHP4 to PHP 4 that my host has just done ? or just a coincidence ?

 

Anyone in a similar situation ?

 

dca

Link to comment
Share on other sites

  • 9 months later...

Hi there,

 

My problem is that the application works fine but when i submit my tekst it says:

 

La operacion se ha realizado con exito

Se ha modificado el contenido del archivo de noticias /home/luneya/domains/luneya.nl/public_html/site/Dutch_news.txt

 

The file "Dutch_news.txt" lookst perfect in my working shop. and the same text also is visible in the TyniMCE editor. It just will not change any of the text.

 

the file permissions of "Dutch_news.txt" are 777 so that is not the problem.

 

I hope anyone can help me.

 

Kind regards,

 

Bert

Link to comment
Share on other sites

  • 10 months later...

hello. is this still supported?

 

I have a question about the tinyMCE integration. How does it work? Do I have to install the contribution that replaces all textareas with tinyMCE html textareas or the Krika news is enough for the textareas only used in Krika News?

 

In the opening post it says

"- Added Tiny_mce wysiwig HTML editor based in contribution:

*TinyMCE WYSIWYG HTML EDITOR by Sputnik77

http://www.oscommerce.com/community/contributions,4563"

 

Do I have to install the contribution by Sputnik77 for the tinyMCE editors to appear in the Krika news textareas?

 

thanks

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