vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   [cinq's vbArticles v1.0 Hack] - The development process (https://vborg.vbsupport.ru/showthread.php?t=69906)

cinq 01-09-2005 06:04 AM

For my own use, I already purchased another WSYIWYG editor which integrates real easy and allows for image uploads and even sorting by folders etc.

I have an idea of how it can be done with Spaw as well ( making use of its dynamic img lib feature ).

Currently, when you add an article, the article 'pre-add' handler lets you input the article title first. It then checks the db for the last id entry and increases this count by one to create a folder in your set article img directory. This folder is the placeholder for this particular article's image(s).

This path ( the folder ) can be passed into the dynamic img lib array of Spaw, so that it looks into this folder for either img uploads or inserting of images into the article content.

All this sounds well and good, but at this point in time, I CANT EVEN GET THE EDITOR TO SHOW properly and it is really fustrating.

It gives me all sorts of warnings about not being able to include the neccessary config/control files in the spaw package.

And if I change a lot of the variables in the spaw config files, and do get rid of the warning erros ( hardcoded paths just to test mind you ...for e.g. C:/program files/wamp/www/spaw/config.blah blah ), the warning messages go away, the textarea box shows, but with no WYSIWYG editor interface, just the empty white textarea.....

arghh.

any ideas Solox ?

SoloX 01-09-2005 06:12 AM

I was having similar path issues .. i manually entered these two variables to fix the path problems (in spaw_control.config.php) ..

$_SERVER['DOCUMENT_ROOT'] = '/home/html';
$HTTP_SERVER_VARS["DOCUMENT_ROOT"] = '/home/html';

spaw will not load properly if it cannot determine some of the paths .. try this and see if it helps ..

cinq 01-09-2005 06:24 AM

Ok, I placed the spaw directory into the admincp dir.

I amended the spaw_control.config.php accordingly and this is what it is at the moment ( just the first few lines .. ):

PHP Code:

// directory where spaw files are located
$spaw_dir '/spaw/';

// base url for images
$spaw_base_url 'http://localhost/image/articles';

if (!
ereg('/$''c:/program files/wamp/www/forum/admincp'))
  
$spaw_root 'c:/program files/wamp/www/forum/admincp'.$spaw_dir;
else
  
$spaw_root 'c:/program files/wamp/www/forum/admincp'.substr($spaw_dir,1,strlen($spaw_dir)-1); 

In my file, I added an include which looks like this :

PHP Code:

include_once ('c:/program files/wamp/www/forum/admincp/spaw/spaw_control.class.php'); 

and call the instance using :

PHP Code:

$sw = new SPAW_Wysiwyg('spaw1',stripslashes($HTTP_POST_VARS['spaw1']));
$sw->show(); 

Erros are gone now, but textarea no WYSIWYG controls.

Any ideas ?

p.s. thanks for the paths thingy :)

SoloX 01-09-2005 06:42 AM

I notice u say spaw dir is /spaw/
its not under the root dir if i am reading your config files properly.
Put your entire spaw dir in root and change the include line.
OR
change the spaw dir accoring to the proper relative url

SoloX 01-09-2005 06:51 AM

I am still not convinced spaw is finding all material it needs ..

can u put spaw in root dir and try this block in the config?
PHP Code:

// directory where spaw files are located 
$spaw_dir '/spaw/'

// base url for images 
$spaw_base_url 'http://localhost/'

if (!
ereg('/$'$HTTP_SERVER_VARS['DOCUMENT_ROOT'])) 
$spaw_root $HTTP_SERVER_VARS['DOCUMENT_ROOT'].$spaw_dir
else 
$spaw_root $HTTP_SERVER_VARS['DOCUMENT_ROOT'].substr($spaw_dir,1,strlen($spaw_dir)-1); 


cinq 01-09-2005 06:53 AM

yep, it is in my admincp dir :

ie. forum/admincp/spaw/

I will try your suggestion now.

cinq 01-09-2005 07:06 AM

Quote:

Originally Posted by SoloX
I notice u say spaw dir is /spaw/
its not under the root dir if i am reading your config files properly.
Put your entire spaw dir in root and change the include line.
OR
change the spaw dir accoring to the proper relative url



But I cannot change
$spaw_dir = '/spaw/';
to $spaw_dir = 'c:/program files/wamp/www/forum/admincp/spaw/';

based on the code here :
https://vborg.vbsupport.ru/showpost....9&postcount=53

Since :

$spaw_root = 'c:/program files/wamp/www/forum/admincp'.$spaw_dir;

Changing it would make $spaw_root

'c:/program files/wamp/www/forum/admincp'.'c:/program files/wamp/www/forum/admincp/spaw/'

SoloX 01-09-2005 07:10 AM

ohh .. leme PM u

cinq 01-09-2005 09:00 AM

Close to 2 hrs of debugging SPAW with SoloX later, it still doesn't work .... darn it :(
Thanks for the help though SoloX, appreciate it greatly ! :D

cinq 01-09-2005 12:44 PM

I give up with SPAW.

FCK next


All times are GMT. The time now is 04:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01399 seconds
  • Memory Usage 1,753KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete