The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question regarding whether UserSpice is a good fit...
#1
Hi.. Stupid question for ya all.. I'm working on a redesign of a website from scratch and its for an older couple who frankly don't know the ins-n-outs of HTML or markup and I would like to allow a feature on this site so that they can essentially login via a login page (that's where UserSpice would come in) and edit ONE file using something like TinyMCE -- save it and it writes it out as HTML into a specific file which will be included as a sort of blog entry on their homepage for the site. What I'm wondering is whether UserSpice would work for this sort of application. I had looked into various flat-file CMS's but decided that they were way overkill for what I need.

Basically, I just need some way to authenticate a user and give them access to alter one file thru a browser based WYSIWYG editor. That's pretty much it.. thoughts? Seems like UserSpice would be great for this..
  Reply
#2
Yes. Should not be a problem. What format do you need the file to be? Any reason you couldn't store the information in the db?
  Reply
#3
Hi Dan..

The file created by something like TinyMCE needs to ultimately be in HTML as I'm not planning on having yet another piece to convert from some intermediary format -- if possible. I guess the info could be in the database but seems like overkill.. There's only a single user that will ever edit this file and I'm frankly just trying to keep it as simple as possible, but also secure obviously.

Quick question for you if you dont mind.. I'm trying to install the latest version UserSpice43dev-master and I'm getting a PHP error logged as follows as the code isn't being updated by the installer for some reason. I've tried several times to run thru the installer but when its time to connect to the DB it fails and I find the following PHP error:

[04-Feb-2018 00:16:24 Europe/Berlin] PHP Parse error: syntax error, unexpected end of file, expecting ')' in /Applications/MAMP/htdocs/UserSpice43dev-master/users/init.php on line 28

<pre>
Code:
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';

// Set config
$GLOBALS['config'] = array(
    'mysql'      => array(
</pre>


I'm assuming that the installer's job is to do an append to the contents of this file but its not.. thoughts?
  Reply
#4
Ok.. My installation problem is a permission problem.. I don't know where though.. This is on a Mac (OSX) and I'm using MAMP. I've opened up the entire htdocs path to be writable for now -- all the way down to the users/init.php but the file never gets written to.. Ugg.. I see no errors written out to the php log though except the above that comes once and only once. Any ideas? I did verify that MAMP is using my account for running Apache so all should be good...
  Reply
#5
Maybe someone can show me what the init.php login creds look like for a valid installation so I can do it by hand.. I've got no clue why MAMP is upset..
  Reply
#6
I was just going to say that. Easy peasy.

I'm sure it's a weird mac file permissions thing.

So, grab this file https://pastebin.com/FPX6t30a

Delete everything in users/init.php paste that in

Put your own 4 DB credentials (host, username, db name pw) in there

You may want to do your own time zone in there, but you can do that later.

GO into install/install/includes/chunks
and import sql.sql into your database

Delete the install folder. You should be good to go and there aren't any other times that userspice has to write files like that.
  Reply
#7
ok.. Thanks.. I was, with your help, able to get it up and running.. Ugg.. I've got no idea why it didn't want to work -- you're I'm sure correct -- it was some sort of odd Mac permissions thing. All is good now.. Thank you!
  Reply
#8
Regarding your project itself. I don't know exactly what you're trying to accomplish, but I don't see why you can't use the "profile" of user 1 as a good place to store your html.

So when the person logs in, they just go to users/edit_profile.php to do their html editing.

Then on whatever page you want to show the bio, just do

Code:
$html = $db->query("SELECT bio FROM profiles WHERE user_id = 1")->first();

Then put that on any page with
Code:
$text = html_entity_decode($html->bio);
Code:
echo $text;

  Reply
#9
Hey.. Thanks.. That sounds almost too simple!! I'll check it out. What I suggested to them is a sort of minimalistic blog sort of thing -- this is for a faith based ministry -- they travel a lot and want to let their supporters know where they've been and what they're doing. Thinking upon it further though, they may want this part of it to be perhaps a limited "teaser" entry and a more in-depth entry elsewhere within the system -- I'll have to ferret that out as I move towards implementation..

Is there any "textual" limit to the length of the profile on a user? In this case they would be pushing down/adding on top new "blog" entries with associated dates and perhaps a brief entry with maybe a picture and/or a link to a gallery entry for a particular trip. Because of the embedded links or desire to have an image, perhaps it might not be best for the profile -- but perhaps US doesn't care whether there are image(s)/links in that content.. I've not had enough time to check it out. Thanks! This actually sounds pretty darned straightforward!

PS. I think I saw somewhere in the settings that US uses Bootstrap? I'm using Bootstrap 3.x for now (not alpha 4) -- is that going to pose any compatibility issues with US?

Thanks again!!
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)