Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FAQDesk version 1.0 --- Released


moyashi

Recommended Posts

  • Replies 132
  • Created
  • Last Reply

Top Posters In This Topic

ok, I started NewsDesk (the base for FAQDesk) on a November snapshot. NewsDesk also has troubles with anything before November 2002. Possibly you might have to add a function to faqdesk_general.php.

 

I suppose your site is pretty well moded and you don't want to upgrade to MS1 do you.

 

however try this.

 

add this code to faqdesk_general.php

 

 function tep_get_uploaded_file($filename) {

   if (isset($_FILES[$filename])) {

     $uploaded_file = array('name' => $_FILES[$filename]['name'],

                            'type' => $_FILES[$filename]['type'],

                            'size' => $_FILES[$filename]['size'],

                            'tmp_name' => $_FILES[$filename]['tmp_name']);

   } elseif (isset($GLOBALS['HTTP_POST_FILES'][$filename])) {

     global $HTTP_POST_FILES;



     $uploaded_file = array('name' => $HTTP_POST_FILES[$filename]['name'],

                            'type' => $HTTP_POST_FILES[$filename]['type'],

                            'size' => $HTTP_POST_FILES[$filename]['size'],

                            'tmp_name' => $HTTP_POST_FILES[$filename]['tmp_name']);

   } else {

     $uploaded_file = array('name' => $GLOBALS[$filename . '_name'],

                            'type' => $GLOBALS[$filename . '_type'],

                            'size' => $GLOBALS[$filename . '_size'],

                            'tmp_name' => $GLOBALS[$filename]);

   }



   return $uploaded_file;

 }

 

I hope that this will work.

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

First off all, thank you for your advice, I really appreciate it.

 

I added the code in the followings files:

... admin/includes/function/faqdesk_general.php

... catalog/incluedes/function/faqdesk_general.php

 

Afterwards I have been trying to create a Category:

 

faqdesk921b.jpg

 

But the error continue in admin area:

 

faqdesk921.jpg

 

And the front area:

 

faqdesk921c.jpg

 

I?m sure we?re very close to make it works this contribution in this snap version. Thank for your comments ! :lol:

Link to comment
Share on other sites

1 more function to go it seems.

 

tep_get_local_path()

 

try do the same here too.

 

hmmm ... MS1 is looking pretty friendly more and more ... hehe :D

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Thank you, I included the function and the admin area works fine.

I think the last point is in the front area,

 

Warning: Wrong datatype for second argument in call to in_array in /... /catalogo/includes/boxes/faqdesk.php on line 83

 

Warning: Wrong datatype for second argument in call to in_array in /... /catalogo/includes/boxes/faqdesk.php on line 90

 

I appreciate your advice.... :D

Link to comment
Share on other sites

  • 2 weeks later...

I am Back from being very sick... i decidied to go to the standard MS1 2.2 release (2/17/2003) to make life easier. (before i was using a november snapshot). i installed FAQDesk fine. every thing works well. i haven't come across any error messages. the only problem i am having is one i was having before with the snapshot release.

it is the long answer listing always shows up when the faqs are being listed in faqdesk_index.php I thought you could go to the admin and click on faq listing and set long answer to 0 to make it not show up in the listing. i do want to have a long answer once the question is clicked on. I asked this before and this is what moyashi said

@ long answer listing

Just go to admin and click on listings ... pretty simple  :D  

 

the problem is that i have done that and it didn't work.

any ideas would be much appreciated.

 

(am i making sence or am i still sick? :? )

It's a Zoo in Here, Literaly...

Link to comment
Share on other sites

i reinstalled the contrib as well as the original pages from osc just in case there was something i changed accidentally. it is still not working, i am trying to get the question and short answer only to show up in listings part. it always shows the long answer. the weird part is that the other functions work, like the date added can be shown or not shown from the admin.

i did finally get the disired results from going through all of the files and deleting the long answers part of the code. it took a while to get it all out of there but i now have it moded to work excactaly as i wanted.

this is a great contribution!

Thanks :)

It's a Zoo in Here, Literaly...

Link to comment
Share on other sites

  • 2 weeks later...

Hi Moyashi

 

I've installed your mod, and everything works except adding a new faq, when i do so IE6 crashes , any ideas why this might be :?: i'm running a snapshot from 15 Apr 2003 MS2.2 (i've added in the missing codes as in your NewsDesk mod - because of the the new file upload class)

 

tia

 

Eliot

Link to comment
Share on other sites

hmmm, not sure. I'm not planning on doing any snapshot support. I'm pretty busy at the moment ( $$ :D ) ...

 

However, I will support MS 2 when it has been finalized.

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Carsten;

 

I just installed your FAQDesk mod on a 2.2 snapshot from about 12/17/02 and everything appears to work pretty well... Thank you for this great contribution!

 

A couple of minor issues, though:

 

1) The hyperlink function in the body of the answer does not produce a clickable link

 

2) Slashes on apostrophes, etc. are repeated whenever you modify an existing listing, so they end up showing in the public view after a modification (I can live with this one, just have to remember to remove the slashes).

 

3) The controls for showing/not showing and arranging the sequence of the items in the listings seem to have no effect... I an mark "Display Long Answer" and "Display Short Answer" both as "0" to not show in the listings and they still appear.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

egad :!:

 

#1 and #2 I'll take a closer look into.

#3 should be working. should also work on an older snapshot than MS1 ... hmmmm errrrr I guess I'll be doing lot's of work this week :cry:

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Just to expand a bit on #3...

 

It seems that I can make the date and the question disappear by marking them as '0' in the admin, but both the long and short answers remain visible to the users when marked '0' in admin.

 

It also seems that the date and the question will move appropriately based on the setting selected... the long and short answers seem to be 'stuck' always showing and always on the right side of the table in the topic listing

 

...and I just tried a second FAQ entry with several of the provided tags in the long text portion and upon submit, my IE6 caused an error report to be generated to M$

 

(sorry :( , I don't mean to rain on the parade - I really DO love this contrib!)

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Well, hate to say this but I wonder if product listings is doing the same. My code is just a tweeked product_listings.php file.

 

I'll try to look at this tonight.

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Hi Carsten.

Just installed your news desk I'm very surprised over the functionality. OSC is now the only CMS that handle news in multiple languages for real. (yep, Nuke's doesn't). Apart from som minor problems with the SQL file (problems with inserting data) everything seems to work fine :)

 

If you one day are about to make som modifications to the news system, a possiblity to set an end date on the news (and start and end on the categories as well) should be welcome. :wink:

 

Thx for letting us useing it:-)

 

/longsword

Link to comment
Share on other sites

Hi, this is actually the FaqDesk thread.

 

Hmmm, the start and end to NewsDesk threads was something I had first worked on but my JavaScript isn't so grand and ended up being half done.

 

Yes, you're right I should finish that part of the contrib.

 

Another thing to add to my todo list.

 

:D

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

Hi ALL :D

 

A kind user sent this email to me ... the below code fixes some problems with images in newer snapshots.

 

 

Hello, I just finished setting up your FAQ mod on a client's osc installation.  It seems they hae updated their uploading functions into a class.  So I had to make 2 changes i nthe admin to make it work.    Oh, btw this is for the latest dev version of osc as of May 1st.

 

in the category image section i replaced the whole image upload section with this:

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

 

 

if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) {

 tep_db_query("update " . TABLE_FAQDESK_CATEGORIES . " set categories_image = '" . $categories_image->filename . "' where categories_id = '" . tep_db_input($categories_id) . "'");

}

 

 

 

and the product add section al lthe image upload stuff with this

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

 

 

if ($faqdesk_image = new upload('faqdesk_image', DIR_FS_CATALOG_IMAGES)) {

 $faqdesk_image_name = $faqdesk_image_name->filename;

} else {

 $faqdesk_image_name = $HTTP_POST_VARS['products_previous_image'];

}

 

if ($faqdesk_image_two = new upload('faqdesk_image_two', DIR_FS_CATALOG_IMAGES)) {

 $faqdesk_image_two_name = $faqdesk_image_two->filename;

} else {

 $faqdesk_image_two_name = $HTTP_POST_VARS['products_previous_image_two'];

}

 

if ($faqdesk_image_three = new upload('faqdesk_image_three', DIR_FS_CATALOG_IMAGES)) {

 $faqdesk_image_three_name = $faqdesk_image_three->filename;

} else {

 $faqdesk_image_three_name = $HTTP_POST_VARS['products_previous_image_three'];

}

 

 

 

Thanks a lot for the mod.  It looks and works incredibly well.  I had a couple issues with browser crashes at first (ie6 xp), but when i made the above updates everything seemed to work ok.

 

Mark A.

 

Oh, and if you happen to use these changes and reference me anywhere (you don't have to), please don't use this address but [email protected] instead.  Thanks!!!!

 

 

Cheers and special thanks to Mark :!:

NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Link to comment
Share on other sites

i solved the Problem width:

 

Warning: main(includes/modules/includes/modules/faqdesk/faqdesk_listing.php) [function.main]: failed to create stream: No such file or directory in /home/winthrop/public_html/cart/faqdesk_search_result.php on line 308 



Fatal error: main() [function.main]: Failed opening required 'includes/modules/includes/modules/faqdesk/faqdesk_listing.php' (include_path='') in /home/winthrop/public_html/cart/faqdesk_search_result.php on line 308

 

when u start the FAQ search.

Simply delete in faqdesk_search_result.php the "DIR_WS_MODULES . " at Line 290 in the Code:

 

"require(DIR_WS_MODULES . FILENAME_FAQDESK_LISTING);"

:wink:

Link to comment
Share on other sites

Hello,

I?m very confused. The fd1.0 works great on my 2.2MS1 except my most favourite error:

 

The categorie name of a FAQ is not shown at my default/index page, but for example when i click (it doesn?t matter what is clicked) at Products, or search the Categorie name -it appears. In the sourcetext even the <a href> appear but not the name of categorie between <a href> and </a>

 

the strangething: the pagecall "default.php" is the same - at default.php and for example default.php?cPath=4 Hope someone can help

 

Loks like that: Startpage - Productpage

before.gifafter.gif

 

 

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

There are no stupid questions - only stupid answers

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