Support Forums

Old 12-14-2006, 04:12 PM   #1
Senior Member
 
Join Date: Dec 2006
Posts: 105
Rep Power: 13
darek is on a distinguished road
Default Bug in Seller Store

Ok, I know nothing about coding, but I just bought the 68c and have some plans to use it. I am testing it now. I noticed that the when user uses Seller Store the photo does show on RTE but after saving it disapears. Then I noticed that it works fine when in admin, but when in admin something is written and submitted then user cannot load a logo. So I compared 2 files. I have found little changes to admin.php and index.php. Here are the lines:

admin.php
if(isset($HTTP_POST_VARS['sImage']))
{
$extraSQL=",sImage='".safeAddSlashes($HTTP_POST_VA RS['sImage'])."'";
}
$sSQL=sprintf("UPDATE ".PREFIX."store SET sTitle=%s, sDescription=%s".$extraSQL." WHERE sID=%s",
GetSQLValueString($_POST['sTitle'], "text"),
GetSQLValueString($_POST['sDescription'], "text"),
GetSQLValueString($sID, "int"));

index.php
if(isset($_POST['sImage']))
{
$extraSQL=",sImage='".safeAddSlashes($_POST['sImage'])."'";
}
//badwords
$description=@$_POST['sDescription'];
$description = filterword($description);
$description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]"," ", $description);

$sSQL=sprintf("UPDATE ".PREFIX."store SET sTitle=%s, sDescription=%s".$extraSQL." WHERE sUserID=%s AND sID=%s",
GetSQLValueString($_POST['sTitle'], "text"),
GetSQLValueString($description, "text"),
GetSQLValueString($userid, "int"),
GetSQLValueString($sID, "int"));

we don't need to mention the badwords for this purpose, but I inclosed this in order not to devide the code

So I chaned this line "GetSQLValueString($description, "text")," from index.php and put this one: "GetSQLValueString($_POST['sDescription'], "text"),"

All seems to work fine now.

I would have a question to moderators: is it ok? Is anything else that should be changed?
darek is offline   Reply With Quote
Old 12-14-2006, 04:19 PM   #2
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,981
Rep Power: 115
Eric Barnes is a jewel in the rough
Default

If it is working now I assume it is fine.

However by doing that you are skipping this section:
PHP Code:

        $description
=@$_POST['sDescription'];
        
$description filterword($description);
        
$description ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]"," "$description); 
Which handles the badwords and strips out any urls entered.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is online now   Reply With Quote
Old 12-14-2006, 04:41 PM   #3
Senior Member
 
Join Date: Dec 2006
Posts: 105
Rep Power: 13
darek is on a distinguished road
Default

Hi, we meet first time, the code you wrote - ok, I got it, but it just did not work properly, is any other way to do it?

I have one more question. I noticed that the tiny mce is quite more advanced, I noticed that this code:

PHP Code:
theme_advanced_buttons1 "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,separator,undo,redo,code,wphelp"
controll the buttons, what should I write to have more advanced code like tables, different text etc, or, if I could go a bit further, I found this RTE http://www.fckeditor.net/demo/ it is quite good and it is in polish, would it be very difficult to change the RTE, this would be very useful for me. Thanks a lot.

Last edited by darek; 12-14-2006 at 04:45 PM.
darek is offline   Reply With Quote
Old 12-14-2006, 09:21 PM   #4
68 Classifieds Staff
 
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 4,981
Rep Power: 115
Eric Barnes is a jewel in the rough
Default

To integrate the full version of tinymce you can download it from their site then use their setup instructions. We use a trimmed down version because the full package is pretty large and ads a lot to our download size.
__________________
Eric Barnes
68 Classifieds Developer
Please do not send me a private message asking for support. Instead use these open forums or our ticket system.

Customer Area | Issue Tracker | Documentation | 68C Mods | Submit a Ticket | 68 @ Twitter | My Modules
Eric Barnes is online now   Reply With Quote
Old 12-15-2006, 03:13 AM   #5
Senior Member
 
Join Date: Dec 2006
Posts: 105
Rep Power: 13
darek is on a distinguished road
Default

Thanks a lot, I will give it a try.
darek is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modification: Seller Store Eric Barnes v3.1 Modules & Modifications 41 12-20-2007 01:48 PM
Seller Store - Help Jake v3.1 Modules & Modifications 2 11-01-2006 10:42 AM
Totally lost - Seller Store gregbatch v3.1 Questions & Support 2 08-05-2006 05:33 PM
Store - minor points - not bugs Chaslie v3.1 Questions & Support 1 04-12-2006 08:49 AM


All times are GMT -4. The time now is 07:21 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0