PHP

I know this has been discussed in other threads but I would like to add my support for the ability to include php code to a page within BSS. I am at the stage in my first BSS project where I am ready to export it and demo it to the client, but I will have to add php code after the export. There are almost certain to be layout changes after the client demo, at which point I will have to either change the exported html files manually or make them in BSS, export again and then add all the same php code again, neither of which is a very attractive option.

I understand the arguments about BSS not being a php IDE but I'd like to suggest a way round that. You could have PHP object which when opened would pass its contents to your favorite editor or php IDE (specified in the BSS preferences). When the file is closed in the external editor, the contents would be exported back to the BSS PHP object. I have seen this technique used with other products whose users prefer to use an editor like TextWrangler to edit their code rather than the product's built-in editor. TextWrangler and other smart editors recognize php files and have built-in formatting and even error checking in some cases.

I hope this or some other way to support php will turn up in BSS some time in the future.

Thanks, Pete

You could add your php code in a custom code component, the only problem is the design view in BSS won't pick it up

Right, I saw that solution elsewhere. I'd end up with a lot of custom code components that way! Pete

I use a lot of php in my project. Simply all file are at last *.php so I wrote a script that renamed all *.html to *.php

in my files in BTS I wrote placeholders like {XXX_php_0001_XXX}

one search and replace over all files... and my php-code is right where it belongs.

So with the scripting function on export... its all done for us php-devs...

interesting Frank - do you have a link to your site for reference.

also am i to assume your design view was just full of custom code

How do you insert the placeholders? I assume they must be part of a span tag or something? I'm not sure I follow the "one search" part of this. Every line of php in my files is different so would take many search/replace operations.

I've come to be comfortable with using BSS for screen layouts, exporting, then using NetBeans for editing in my php code and html/javascript tweaks. I only go back to BSS if a completely new page is required.

opps, sorry for the delay... I didn't see your post until now...

@Chris I did not have made an reference, but I hope I find some time to do so.

and NO my BTS Code is mostly without any custom code. I try to make all with the intern BTS components. Just some special thing, that BTS does not allow, I make with custom code

I do "hate" custom code... if the code could be made in BTS. So I try to realize everything without custom code. The Online Components have some interesting parts, but when I downloaded it, and I see - all in custom code - I got mad.

@phaworth to place an Placeholder, I use mostly the paragraph component

( I an space between the "<" and ">" and the tags, because it doesn't work in the forum without) a paragaph placed an the text will be "{XXX_php_0001_XXX}". I use some special text that NEVER will be used in the normal code. So I do not replace something wrong, by accident.

the html-code then looks like: < p >{XXX_php_0001_XXX} < /p >

After the export, for big codes I use a linux-script, for some small code I use the normal search-and-replace in Netbeans, which is my php-working machine.

I search then for the whole < p >{XXX_php_0001_XXX} < /p > and replace my < ?php require("some_code.php"); ?>, for example.

Only if I cannot place a paragraph, then I use an Attribute .

I use the replacing mostly when the design is not ready, and I have to create the rest of the site. So if the Designer sent me an new version, I don't have to make the whole code new. Each project I start with BTS for the design - switch to Netbeans and convert my CSS into SASS - and import this new CSS back into BTS (hope the SASS-Support will be find its way too BTS, soon :=) ) Like you do.

I'm just adding that I think this would be a great feature too. Even if a separate define editor was to be used for handling this. It's nice to be able to keep all code for a site together in one place.

Hello everyone!

I would suggest at least options in BTS to rename files to .php and to be able to export project files as .php files. That would save a lot of time later (recreating links, etc.).

Sincerely, S.Popic

Hi to all!

Here is my voice to support the request for the PHP option!

@chetstriker

Yes, I would love a program, where is "all in". But this will be a lot of work. So if one good program cannot all the things... it is sometime better to use a workaround.

@spopic

save as *.php is a thing, that I would use every day :)

but there is an easy way to get this fixed with a little "workaround"...

On Export... we can execute a script.

So I wrote one script that renames all *.html files to *.php files. And in the same script I renamed, "inside" of the *.html files, all links to *.php.

I now, need to copy the script-starter to the export menue, and I can work on with php

I'm puzzled by the comments about the need to change .html files to have .php as their extension. It's easy to configure your web server to parse php statements in html files so there is no need to rename the exported files. For me, I added these lines to my .htaccess file:

AddHandler fcgid-script .html
FCGIWrapper "/dh/cgi-system/php56.cgi" .html

Back to the issue of handling php within BSS. Frank's method of including specially formatted paragraph tags made me think of another approach to this. As far as I know BSS does not currently allow you to insert comments into the html it generates. That would be a generically useful enhancement and would also allow us to put php code into the comments. No parsing of course but I would just write my php code in NetBeans and copy and paste it into BSS.

1 Like

Hi,

I agree this is not a big issue, but it is not sufficient to rename html files to php extensions only, because each generated html file has menus and links which points to html files but not to php files. I usually recreate links In Dreamweaver (it is sufficient to change one link, and the program will update all other links automatically), but anyway, I would prefer option in BTS to enable export to files with php extensions.

Sincerely, S.Popic

@phaworth

changing the .htaccess might work, but I then the Enduser has to change his webspace. That should be no point. But cool idea :)

And I can put PHP-Code, and comments directly into BTS: I add an LIB with a Custom-Code <div>XXX_XXX</div>. Between the DIV, you can write everything you want. I prefer some Text, hat "is never, ever used" in my real code, like "XXX_" or some other placeholders.

You can also write <div><?php // My Comment ?></div>.

If you don't like this "PHP-Code" visible inside BTS, then simple do <div class="hidden"><?php // My Comment ?></div>.

For my NAVBARs I replace simply <a href="#">First Item</a> with <a href="#">My own Menue in PHP</a>. So I can create my Menue in BTS, and after export I change it with Database content.

So I prefer the option to "Save as PHP", too, but that it not helping for noscript use :)

(For Linux Users... I am re-writing my personally script to an public script, so that anyone could use it easily. But I need some time to do.

And for Windo***ws Users (if there are still some outside) maybe the Batch-files will do the same )

Many HTML editors allow the editing of .PHP files (and other server side script files), and just ignore the 'Beginning' and 'Ending' script tags. A nice addition to BSS would be to provide the definition of commented code through beginning and ending tokens (i.e. '<?php' and '?>').

Yes,

ignoring everything between <?php and ?> in the BBS Design an Preview would be great.

But it should not be ignored on EXPORT :)

Hello, I have 3 questions about BBS. I am new in this forum. I bought BBS since two weeks. So - I have a news php integrated script. How can I use this news php script with BBS or in Bootstrap Studio?<br /> - I have also wowslider 7.8 and easy CSS menu Pro. The two softwares are responsive. How can I use them with BBS or in Bootstrap Studio?<br /> Please help me - How can edit in HTML on Bootstrap Studio?<br /> - How can unlock a components?

Thanks to help me

You cannot unlock BSS components

I asked this myself a while ago and the answer I got was along the lines of it wasn't likely to happen, and that is fine. I started playing with laravel anyway and I cannot imagine that there will be integration within bootstrap studio for that sort of development.

Depending on how heavily you want to integrate php into a site, use custom code snippets. What I do is generate quick snippits or test ideas in Bootstrap Studio and then import the code into Microsoft Visual Code to finish it off and integrate it into a website.

Either way, it would be awesome if we could simply export our sites using the .php extension

Thank you my friends for the reply i receive. But as a new i need some need about question.

1 I have bought since two days Boot Extended 370 HTML5/CSS3 Components. Now i want add to my BSS. I have in package 4 folders. In my IU forder, i have css folder, js folder, img folder, and 370 ul.html files. Can you help me?

2- I love parallax scrolling effect. I try to make it. I set css to background image some properties and i see the background image fixed when i see jumbotron heading text scrolling on the background image. Now my problem is i want the background image scrolling also but with slow speed? Can you help me? Thanks you