Question about read more links in posts


I've been building on a website where anyone can post anything and it'll all be on a main wall where everyone can read. Only users logged in can post. I'll be setting up user registrations and login sessions later. Just thought of how this next one is possible.

A user's post will be formatted like that article right there. With title, description and time posted. The post will be limited to lets say 150 characters, so if i'd then press READ MORE I could see the entire post on a new webpage.

I'll also later on be adding comment fields where registered users can comment. How does any of this work?

So i guess the place to start is to ask if you're asking how to do this at all or how to do this in the BSS app? If you're asking how to do this at all, then you're building in the wrong app for what you want. As much as I love to tout the usefulness of BSS as it's a great app, you're truly doing this the hard way when there are systems already built that can do what you want and all you need to do is design the aesthetics and tell it your settings for specific things.

I would suggest first to start with something like SMF Forums which gives you a Forum platform built into the website and that would give you the area for people to post on. I'm sure it has the ability to add plugins for comments and such on articles as well. It's a little more difficult to set up than some of the others, but much more powerful and it's not horrible to setup just more bells and whistles than the other CMS options. The other 2 more obvious CMS choices would be Joomla or Wordpress which both have the ability to add plugins for comments on articles and so on. All of these CMS systems as well as many others have login setups already built in and all you need to is edit the settings to tell it how you want it.

You're trying to do it all the hard way, and it will take a lot of scripting knowledge, or searching for scripts to do exactly what you want and that would probably be a whole lot more time consuming than setting up something in SMF Forums, Joomla or Wordpress.

I agree with jo's comments regarding using word press to control blog type posts as it will be much easier for you to post and for random strangers to post, however that being said you can still do what you are wanting using this tool.

To to do what you ask will require either a page of posts or a new page for each post. if you do new page per post then you just link to that page direct or if you list lots of post on a page then you will need to set each post to have a div ID and then you anchor link to said div.

Yeah, I thought about adding that info too Chris, but it didn't cover comments so I left it all out lol. He's right though Kriss, you can do this with BSS and use anchor links easily to get around the pages for posts, but you'll need to find a comment system that you can apply to this setup in order for people to be able to comment as you're wanting. That's the main reason that I think a basic CMS setup would be best applied. Either way works though, just depends on your knowledge and/or the amount of time needing to be spent on it.

I'm mostly doing this for learning purposes. So I've got all the time in the world to make this work. I was just wondering about the mechanics and codes behind both comments and the read more page. I personally prefer it done manually rather than wordpress or joomla.

And yes, I'm using BSS to do the basics (front end) and then move all the files into Sublime and do PHP and MySQL there. I'm just working on the design right now, I have another question though:

If I lets say just export the page and add login registration and login sessions for it. Then save it to some folder, and then import it into BSS, would the functions work with the preview thing in BSS? Mainly so I could keep building in BSS instead of doing it manually, but I'm thinking BSS might overwrite some lines?

You won't be able to see much of the javascript and PHP stuff, some things will kind of work, and some won't, some will work with quirky looking things which they are working on to fix some of the visual stuff in a future update.

You may want to consider adding custom code blocks in your pages within BSS if possible instead of doing all the work in BSS for the Front end and losing all the capability of drag and drop and attribute editing that is the normal setups of BSS. Importing it in will make the pages all 100% custom code blocks so you would have to edit the entire page within custom code windows, kind of defeating the purpose of using BSS after adding your code if you do it that way. May as well just stay in your external editors. Just a suggestion that might save you headaches and time later.

I don't know why I waited so long to comment to this, but thanks for the tip @Jo. I'll try to use custom codeblocks instead, it may take more time but will be worth it in the end. I couldn't use PHP within BSS cause the pages in it are html. Am I missing something?

No worries and your welcome, if it helps that is lol.

you can put your PHP in there in the custom code blocks, of course it won't all work until you export and rename your file extensions, but .... If you have a nice little app like I do for renaming files that is a whole lot quicker than having to edit all the files for PHP after export and then not being able to use the BSS features after that for those areas if imported back in.

Using a renamer app you could probably set up a default project or something in it or set something up so it's quick and painless after export to change the html to php extensions. Once again this means all your code would be intact for everything except the PHP areas within BSS so you'd have more functionality within BSS for other things working around the PHP areas.

If you have scripting abilities (which I admit I do not lol) you may be able to create a batch file of sorts for BSS for exporting. I don't know what the app's export scripts can or cannot do, but others here have more knowledge on that and may be able to help there. If so, there may be a way to have the renaming done automatically on export for you. Not sure, so let's see if someone else knows and will help on that part of what you can do.

Hi again.

Making a script to rename the files was a really good idea, thank you for that! I've made a script that changes from *.html to *.php. I simply used ren *.html *.php. Thanks! I also made a reverse one aswell just in case.

Awesome, glad to hear it was something useful lol. I don't do a lot of PHP things and when I do it's things I get from others that have created it, so I never know if what I'm suggesting is something feasible or not lol. Glad it was! Good luck with it!