Topic: Full intergration into a pre-existing website.

Hi, I'm a new user here, but I've been using CuteNews on and off for years! I first used CuteNews as an alternative to Newspro, so so many years ago. However, a while back, I closed my personal site, and since then the clients I've built sites for wanted something more along the lines of a CMS. However, I decided to help a buddy out, and build him a website under the pretense that it's done entirely my way (beyond the design), and the first thing I did was installed CuteNews. However, things have changed... lol

I'm using 1.5.3 right now.

Here's what I'm attempting to accomplish: a full integration into a website (to avoid anyone BUT admins seeing where CuteNews is installed). I've gone as far as I can, and I'm down to two last steps. I was able to get the news to show within my site without a problem, but the two parts that I also want to get included into the site are user registration (for comments) and a login section (for everyone).

My site is made using simple PHP. One index.php file, that every other page is included into. I attempted to include the registration page into my site, but because of this line:

require_once(SERVDIR.'/skins/'.$config_skin.'.skin.php');

It breaks my design pretty bad. I commented out that line, and it strictly shows the registration page form, but the captcha does not work. Also, the register form has a form action of index.php, which again wont work. When I used the form without the captcha working, it just takes me back to my index.php (obviously), and I have no idea if it worked at all. I'm thinking the easiest way to accomplish this would be to make an independent page (such as register.php) that calls functions from the CuteNews register file, so we don't have to edit any actual system files. I'm just having trouble figuring out how to do that exactly..

The other thing I'd like to do, is a user login/session start type of system. For example, when you first go to the page (or otherwise not logged in), it shows you as not logged in and displays a username/password box. Then, once you (successfully) login, it just echos a little text like "Hello UserName" (which could maybe be added on to later?), and then it keeps you logged in as you browse the site.

Currently, I have my CuteNews installed into a folder named "admin", and if I can do these last two things, then a casual user will never know the directory CuteNews is installed in, which will add just a slightly higher level of security, not to mention just looking prettier.

Once I have a login section finished, then I'll add a link only visible to admins, taking them to the admin section. That way my friend and his wife (the ones who'll actually be using this) wont have to remember anything other than their user/pass.

Thanks for anyone who can help, I really appreciate it!

2 (edited by 2013-09-03 06:42:08)

Re: Full intergration into a pre-existing website.

Hi, i have a solution for one of your problems, but i am currently working on it myself aswell so i cant help you much. For login panel i use this:

    echo'<form action="news.php" method="post">
<input type="text" name="username" class="undertext">   [url=r]Zgubione hasÅ‚o?[/url]
 <input type="password" name="password" class="undertext">   [url=r]Zarejestruj siÄ™[/url]

<input type="hidden" name="action" value="dologin">
<input type="submit" class="buttonx" value="Login"></form>';


Sorry for the polish language but i am to lazy to translate, anyway its easy to figure out. Just change the action from news.php to your index of CN installation. Unfortunetly this loginbox does not include yet a loop that would show login for unlogged and other content like logout for logged in users. If you are interested in it you are welcome to look at my other topic where i look for the answer.

Re: Full intergration into a pre-existing website.

Thanks! I saw something similar to this in one of the threads on this forum, but until I'm able to manage a full integration, I'm just going to not implement it at all at the time being. Using the facebook social plugin, and by disabling the captcha, users now do not need any sort of login box on the site, so I can just leave a link to the admin panel and call that good.

I'm going to have to sit down one day and really read the source of the user registration page, to see if I can't just use the functions inside a page I create. I could just include the one as is and just edit the file enough to fit within the page, but that wouldn't really help anyone else unless they already know what they're doing. So, if/when I'm able to pull something like this off, I'll report back.

However, until then, I don't see anything really wrong with the way it is currently. I actually got extremely frustrated and decided to scrap cute news and looked for an alternative. But, I quickly (after about 4 hours of installing crap) learned the error of my ways, and figured out that there just isn't anything publicly available for free that's anywhere close to cute news.

Thanks though!

4 (edited by 2013-09-04 18:10:38)

Re: Full intergration into a pre-existing website.

Well i guess this script and support forums are more or less dead. I got help from like 1 user only. That means there are not many ppl interested in it, not even the creators. As for them i think they moved to another project and left CN behind.

Fortunetly i gave myself a goal to make a website 100% based on CN as a way of learning PHP better. So propably i am going to be here a lot until i finish it. It will cotain CN with integrated forum board, loginbox, articles, more contents for users etc.
I can post it as an diffrent version of CN for free download, something familiar to difrences between PHP-Fusion and Extreme Fusion.