Code highlighter like on Symfony and Doctrine sites - php

I really like highlighting and tabs that are used for code snippets on symfony.com and doctrine-project.org sites.
I wish I knew how they managed to achive this. Probably they use some special JavaScript library?

From Symfony 2 online documentation:
The Symfony2 documentation uses reStructuredText as its markup
language and Sphinx for building the output
So go through these tools' documentation to get an idea on how you can adapt them to your site

Related

I have to learn Typo3 or Drupal and I don't know where to start

So we got a great project and we absolutely have to learn Typo3 or Drupal for it quickly. I already know some basic things.
I did the installation correctly for both, I know how to set up a basic Site using Fluid Template in Typo3 and I know how to set up a basic template in drupal without any styles.
My Problem now is how do I style a website since typo3 or drupal doesn't have a field for classes (The fields just get some random ids) and also how can I build a website with multiple sections where I have to style each section individually.
If you have any links to good tutorials or anything else that explains what I need to know I would appreciate it.
First of all, i think you understand HTML/CSS and know that TYPO3,... are content management systems. They're wrapping your content (saved to the database) with a template like HTML Files to send the result to the browser as a full rendered website.
ThomasLöffler already gave you the hint to read the documentation on both websites to make your choice which one you want to use. I prefer TYPO3, but the start many years ago wasn't easy. So i could you explain a little bit, and on a very short way what you need to do... After all please read the docs on typo3.org (Gettin started guide or something)
In TYPO3 you need to include and build your HTML Template. Prefered with the FLUID Template Engine / Framework. After that you need to set it with the TYPO3 TypoScript as your main template.
The content templates like will be rendered by the TYPO3 Extension "fluid_styled_content". This extension has also fluid templates to render the content object into a html output. Before you have enough knowledge about typo3 it's not recomended to change them.
The main thing is, that you need to include a stylesheet (css) file in your site. In TYPO3's TypoScript it's for example like this:
page.includeCSS.file100 = path/to/your/css/mystyle.css
Thats the very short overview and very little explanation what to do. But as Thomas said, you need to understand both and decide for one of them. And of course you need to read the docs first a little bit, before you ask. That would help you and each of us, to give you better answers. Good luck!
TYPO3 Gett started:
https://docs.typo3.org/typo3cms/GettingStartedTutorial/Introduction/Index.html
You can learn a lot of things if you take a look into the code of the official introduction package (https://extensions.typo3.org/extension/introduction/) The package can simply installed over the extension manager -> get preconfigured distributions
Or you just use it as a basis to build your own layout. You do not have to reinvent the wheel ;)

Simple HTML site localization using with specific language routes

I want to translate a simple HTML site into two languages, I have always opted to duplicate the site and put each copy in a "language directory" as follows:
en/page.html
es/page.html
I feel the i18next library could be useful (for what I've read), but I would like to keep urls like in the previous case but with only one version of the file and I don't see a way to achieve this with such library.
Is this possible? Do I need to use node with express to achieve this? Or use a PHP solution?
Thanks for further answers.
Thanks
I think PHP solution is much more better than Javascript. For PHP multilanguage support check gettext, Below are few links which help you to understand
http://www.gnu.org/software/gettext/
https://blog.udemy.com/php-gettext/
complete example of gettext in php
http://blog.lingohub.com/2013/07/php-internationalization-with-gettext-tutorial/
Google Search: (php gettext tutorial)
Wordpress also use gettext libraries and tools for i18n.
http://codex.wordpress.org/I18n_for_WordPress_Developers

TYPO3 Fluid single engine

Is it possible to get FLUID as a Standalone template engine like Twig?
I do not want to use TYPO3 (Neos) neither do I want to use Flow. Since it is way to overkill for a small project.
Has everyone ever tried using Fluid as a Standalone template Engine?
The new answer to this question is: yes.
Here is standalone fluid: https://github.com/TYPO3/Fluid
I'm not aware of a stable and standalone version of the FLUID template engine, but have seen some projects on GitHub that at least contain the basic functionality and some of the ViewHelpers included in FLUID (see links below).
https://github.com/janvennemann/typo3-fluid-standalone
https://github.com/NamelessCoder/fluid

php wiki parser for trac-style formatting

I am creating a very simple cms for my site and rather than using html, I'd like to insert content in the same kind of wiki-format that's used by the Trac project.
Do you know of any open-source php scripts/classes that I can grab and use for this?
Note: I am not trying to create a wiki site. Just that formatting aspect - like how this stack exchange site accepts wiki mark-up and renders it nicely.
After doing some more research, I think I've found it.
The Forever For Now wiki-syntax-to-html parser is pretty much the same as the formatting on the Trac project.
~I have not looked at the code yet, but its pretty likely to be cool. (like Fonzie)~
Edit - I've, now, looked at the code and its beautiful and elegant and does the job.
PHP Markdown might work for you.

Beginners php developer does using LiveDocx white Zend Framework is cpu resource eater?

im beginner in the php world i need to build option in web application that can convert well defined structures
into rtf/pdf from txt/html i found using this site search about LiveDocx php component that is dependent on Zend Framework
now im not familiar white the php engine ( the parser )
so im asking you experts is it good solution to use this components ? or its just over head ?
some simple to use tools:
if you want the easy approach try dompdf - The PHP 5 HTML to PDF Converter. It might work, depending on your html. you could also try ezPdf.
If you need to parse the html, try php's DOMDocument::loadHTML function. It will give you an object that accepts xpath queries for easy handling.
I just want to share my little experience after looking on the net a lot I found http://mpdf.bpm1.com/ this utility is a mix of libraries I´m using it to generate invoices on demand.
I expect this can be useful to you.

Categories