CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Need help to create an administrative page

Print topic Send  topic

Author Message
lemonmuffin

Posts: 7
Posted: 12/23/2013, 11:32 AM

Hello, I'm new to the forum and I wanted to ask for your assistance. I'm currently working on a webpage by myself, at first the request was just a webpage but now they've asked me to make an administrative page to manage all the entries to the webpage: images(including the ones I've put on galleries and each page's background picture) and text. Now, the webpage is already done (with design and flash animations) but I didn't make it on CCS as I must do for the admin page (by my 'client' request), I need to find a way to connect both pages/sites so that when I make a change in the admin page it changes in the webpage as well.

Right now, I not sure how to do that, mainly on how to relate the variables used in the admin page with ones in the webpage to make the updates, so I'm asking if anyone can give me ideas on how to create it, any idea is appreciated.

Thanks


PS. I'm pretty much new to CCS as well....
View profile  Send private message
Lucius

Posts: 220
Posted: 12/30/2013, 5:11 AM

Hi,

Go through tutorial projects, examples in the help file (F1).

But before you do, what you need is a DB running behind the page so you can actually do some admin work. Do you have this already set up? If not I would start there, as this is something you need to design before you can do anything in CCS.
View profile  Send private message
eratech


Posts: 513
Posted: 12/30/2013, 8:07 PM

Hi

Sounds like you went from a website to a CMS, and CCS won't do a very good job with that.

CCS works best with a database and can generate the site from that, and you would need a DB and set up all the bits - and frankly it would be a pain in the neck to do.

In the past I have taken an existing HTML website and used a CMS (well, CMS service really) called cushy cms (https://www.cushycms.com/en) which allows you to add special tags to the HTML and the webadmin basically reads the HTML file, splits out the sections that can be editted, and then publishes/FTP's the files back to your server.

Something like this would be much easier than trying to retro-fit it all into CCS.

Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
lemonmuffin

Posts: 7
Posted: 01/02/2014, 7:18 AM

Hi,

Thank you so much for your answers. Lucius, I do have a DB already and I have gone through the tutorials and now I'm getting to know CCS more but I have some doubts:

1. I was using the application builder with a table in my DB and found out it has a property to make the record window appear in the same page as the grid in a ajax based dialog. I really like how that looked so I tried to use it placing a file upload control in the record form instead of a textbox. Now, when I open that page the ajax works fine but if I try to upload a file it wont let me do it, there's an error message that says that the column which keeps the names of the uploaded files in my DB cannot be null. I've used the file upload inside a record in a page with no ajax, I've set it up to connect to the DB, and works just fine like that but with the record showing like a pop up window it looks like the files I "upload" get lost somewhere.
Is this a problem caused because I haven't configured the file upload like it should be for this case or is it CCS the one who doesn't let it work? Oh and I've tried using the ajax window with textboxes and textareas with CKeditor and it lets me add what I wrote.... :-/

2. One of the things the admin page must be able to do is update images in the site, so I was trying to find a way to do that and right now I've used the file upload as well with a image control to show the uploaded picture, however the picture will only show if I put the image control inside a grid. Is there a way to make the image show without the grid?

Eric, I checked the site you said (although not completely but thanks for the link!) and I have a question, does it offer a hosting service for the website in general or the webadmin only?. Anyway, it would indeed be much easier to do it with that, however I'm not sure if my client will like it since it's not, well, free (I really wasn't expecting it to be) and they already have a contract with a host so they intend to have a site that can be modified made just for them, and just update the files they have within that host........ Still, thanks for the idea, I will comment about it and see my luck.

Thanks and Happy New Year.
View profile  Send private message
Lucius

Posts: 220
Posted: 01/02/2014, 1:00 PM

Hi,

Quote :
grid in a ajax based dialog. I really like how that looked so I tried to use it placing a file upload control in the record form instead of a textbox.

This will not work, as standard AJAX will not allow you file-uploading. You can google the reasons why it will not work (basically it is an asynchronous call, while adding/modifying record in CCS is synchronous). Of course there are ways to do it, but it's more advanced topic and to be honest I have never tackled it to my full satisfaction.

I will be doing another approach in couple months, to see if some better new solutions are now available, as I am now much stronger with jQuery. But this one is a difficult topic :-)

CKeditor should work fine with AJAX.


Quote :
2. One of the things the admin page must be able to do is update images in the site, so I was trying to find a way to do that and right now I've used the file upload as well with a image control to show the uploaded picture, however the picture will only show if I put the image control inside a grid. Is there a way to make the image show without the grid?

Sure, this one is easy. Write in plain HTML the normal <img .... /> tag. But in the "src" attribute place a label, which will be then used to point to the file on the server:

<img src="{Label1}" />

Labels can be placed outside of a grid/record etc. They are very flexible. In theory you could place a single label on empty page, change its "Content" attribute to HTML, and then on the server side generate whole page and output it through this single label.
View profile  Send private message
eratech


Posts: 513
Posted: 01/02/2014, 8:37 PM

Hi - just to clarify the cushycms has a free and a Pro ($28/mth) versions.

The Pro is aimed at a designed or programmer who wants to use it across several (unlimited) sites, and to brand it themselves (and other stuff: https://www.cushycms.com/en/static/pricing )

The Free version allows single sites, and doesn't allow branding etc.

It does the webadmin only, not the hosting - the existing host continues to host. You enter FTP login details and it essentially FTP's the files to the server when you save.

And allow for future support - if you build it, you will probably need to support it.

E
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
lemonmuffin

Posts: 7
Posted: 01/06/2014, 7:55 AM

Hi

First, Lucius, thank you for the explanation, the Label worked fine :-). However, up until now, I've been trying out ideas to create the admin page, but most of all, trying to understand how CCS works as much as possible. Now, I would like to know if you could possibly give me advice on the best way to do the following: As I said before, the admin page must be able to update parts of the website, both images and text, and I'm planning on using file upload and CKeditor. The Label solution seems also seems a good way to do it for me, but I realized all the examples I made had the record form in the same page as the image/label control (which is not the point), so I separated them in different pages but now the controls won't show images nor text.

Obviously, I wasn't doing something right when calling the data from the DB (and maybe... something else) so I went looking around for a solution but I only ended up confused and pretty lost... So, yeah, I don't know how to make the main point of the admin page work in CCS :-X. Do you think you can help me?

Secondly, Eric, thanks for explaining that. I found some free time so I thought of trying it out with another website I had uploaded on a free webhost, but the cushycms won't recognize the ftp server. I even tried all the ftp versions it provides (just in case), also double checked the username, password and website address but it just won't do. Do you think it's because of the free webhost?

Thank you both!
View profile  Send private message
Lucius

Posts: 220
Posted: 01/06/2014, 1:55 PM

Hi,

So you seem to lack one important information here. CCS will help you greatly in writing the administrative page, it will generate the lists and records so you can edit your content, search etc... It will do it out of the box and you will need only to connect the dots.

The user "front" is a different kind of animal though. Here you only display and usually do not edit. Sometimes maybe only change some display options. Above all very frequently you need to display short, unconnected pieces of information.

For "front" you need to take your current site and see what parts you need to put into your DB to be able to manage them. Should it be web page title? Some sidebar text box? Some gallery of images? Some list of articles? Start with designing how you wish to display your content (and also keep in mind how it should be managed - it will be a great impact on your DB structure).

What I would do, I would take as an proof of concept a current page of your site, some more complicated one, upload all of HTML into CCS HTML view. Now start to swap static html with dynamic controls. And here the rule of a thumb is:

If you have a list, gallery, some grid, etc... Use built in CCS builder as much as possible, this will make the conversion much faster and you most likely already know how the data is connected to those elements. Because the builder allows you to connect the DB directly to the object displaying it.

If you have a simple text, label, box with some content, that needs to be feed from DB, but is not part of a bigger structure (like a list), use Label controls. But here you will need to do some work yourself on the code side - your Label doesn't know what it should display, after all...
Check out following Help topics (F1 in CCS):

"Use the Before Show Event to Alter a Label's Value"
"Dynamically Modifying HTML Output" <- all 4 sub-pages should help
View profile  Send private message
eratech


Posts: 513
Posted: 01/06/2014, 4:24 PM

Howdy again - I don't think the free webhost would be a problem, but I've seen enough odd FTP setups to never be 100% sure.

Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.