Drupal 8: How to create completely standalone custom page? - php

Good day,
I've been thrown in the deep DEEP end with a website I have to develop using Drupal 8 and the Acquia platform.
The problem is that the timeframe in which I have to develop this website is so small that there just isn't time to learn all the Drupal in's and out's. My thinking is to create custom pages with custom html etc. and from there Ajax my way through this.
However having absolutely no Drupal experience this proves to be challenging as hell.
Is there any way I can create a custom page using a complete custom template bypassing the Drupal inner workings and just plug into the main objects such as the database etc.
I've been spending a lot of time on Google on how to achieve this but to no avail. Any guidance or advice would be greatly appreciated.
So far I only installed the Bootstrap theme but can't seem to even find the files for this theme in my file structure.

Here is a link to page that explains how to create custom page (the module that gives you custom page, that is) in D8:
https://www.drupal.org/docs/8/creating-custom-modules/a-hello-world-custom-page-module
You'll have to do some reading...but it's not that much.

Related

Use Wordpress or another CMS within a web application?

Apologies for the broad question, but I don't know where to start. I have a php web application for members with various functions and features. On the dashboard, I need to implement some dynamic news - the kind of news that that non-developer can write and publish without any interference with the source code.
Can I implement Wordpress into my existing app so that authors can login, write then publish so that my dashboard can display the latest posts?
At its most basic level, I'm thinking:
a new subfolder for Wordpress with its own separate database.
a plugin to display the latest posts content only
an iframe on my dashboard to display the output of that plugin
But all that seems like a very hacky workaround. Is there a more native way of doing this? Or is there another CMS library that could achieve the same result?
I have a solution that I am running with. It's a separate Wordpress site with the latest posts accessed via the built-in API (https://developer.wordpress.org/rest-api/reference/posts/)
I will be getting all the posts in a category with:
curl https://example.com/wp-json/wp/v2/posts
Then storing the posts in array before looping through that array to display the title and content on my dashboard with:
curl https://example.com/wp-json/wp/v2/posts/<id>
where <id> is from the first call.
This is clean, native and serves the exact purpose I need. The member info, while secured doesn't need to be top-secret, so we're just using the Wordpress password-protection with the same password for all posts so as long as the API calls are server-side with https, the security works too :)
Looks like you want Dynamic News Feature in your existing PHP Web Application.
And you want to build that specific feature in Wordpress.
I don't think it's a good idea to use Wordpress CMS for small features like this.
IF you already have full functional PHP Web Application then I would recommend to use same Web Application to build Dynamic News Feature which will allow users on the site to post.
I don't think that's very complex.
IF you want to get into Wordpress ecosystem then you will need to convert your PHP Web Application into Wordpress and then you can build additional functionality.
I think that's the ideal way to go. Let me know if more questions. Thanks.

Is it possible & feasible to integrate new UI HTML design templates created using Bootstrap into a website developed in PHPFox? If yes how? If no why?

I've a social website like 'Facebook' which is developed entirely in PHPFox version 3.0.7(a social networking platform created in php).
The website looks similar to 'Facebook' and most of it's functionalities resembles the functionalities of 'Facebook'.
Now to make the site looking better I want to integrate new HTML template designs that are developed using Bootstrap (front-end framework)
I've few HTML pages developed by HTML designer using Bootstrap framework. Now I've to integrate those HTML templates into my website which is developed in PHPFox.
While doing so the existing functionalities of the website should remain intact. In other words, the current jQuery/AJAX functionalities should not be changed, they should also work with the new HTML design. Now here comes the major challenge for me. How should I avoid the conflicts between ids and classes which are already been used by current CSS/theme/jQuery/AJAX and the new ids/classes that would going to be applied from Bootstrap framework?
Anyhow ultimately already working functionalities shouldn't get affect.
I'm so much clueless about what appropriate approach should I follow to make this new UI design integration. There is not much information available in the PHPFox Documentation too. Even I don't know whether it's possible to do so or not.
If this new Bootstrap template integration can't be done please explain me in detail why?
How should I make this process of changing UI design smoother and easier? Using the already developed HTML templates am I following the wrong approach?
Also, currently there are two themes used in the website. What should be done to them when the Bootstrap template will be integrated into the website? How to manage these things since they are part of admincp panel of PHPFox?
You can customize PHPFox theme as list here in their documentation. I don't think that I have to repeat all these information here. Starting from editing HTML, CSS, JS are mentioned in the documentation link I have provided. Also don't forget to refer following links. Link1, Installing/Upgrading a Theme, Create a new theme
Or there are sites which you can purchase PHPFox themes.
Update
http://store.phpfox.com/kb/article/221/mini-tut-basics-of-phpfox-ajax
how ajax site wide browsing works on phpfox?
How to get any DOM Element by Ajax in PHPFox
phpfox , get value as response from an ajax call
There is a theme for PHPFox build in Bootstrap 3.0. You can have a try with that. Find the demo URL here and if you like you can purchase from here.

Doubts about CMS in PHP

I have been trying to learn a CMS in php. Visited youtube for tutorials. Joomla & Wordpress.
But when they develop a website using a CMS, I didn't see any php code. It's all just working from a dashboard like building a blog.
I am confused about that.
Don't we have to write code in CMS like we do in Core PHP??
Hi using a CMS you can create a website simply... Wordpress is one of the best content manage system... actually they developed it for easy customization. Only using dashboard you can create pages,blogs etc only... If you want your own functionality You have to learn the coding structure and manual Plugin creation.
But the fact is You will get so many plugins from wordpress depending upon your requirement those it already developed.
As a beginner you can use CMS to create a complete site, but to add any real functionality to create specialist sites you will probably have to write you own plugins and/or themes at some point, or edit existing ones.
For this you will need php/jquery/html/whatever.

edit magento navigation without coding

I just recently started working with a Magento site, and so far I'm really not liking it. I need to remove a couple links from the main navigation, but I can't seem to find the option for it. I've googled it numerous times, and all I see are examples for coding the navigation. My question is, can you edit the site navigation like you can with say wordpress? Seeing how it's a cms I'd imagine the user should be able to make changes to the navigation using some type of interface, and without having to pull the files from the server and edit them.
Also just out of curiosity, for anyone experienced with Magento would you say it's a good choice for a cms? I've heard of it before, but haven't seen many sites that use it.
No!, so you have three options here.
Learn how to extend the navigation with the 100's of tutorials out there, it is really not that hard, assuming you have a theme you just have to edit app/design/frontend/[theme]/default/template/page/html/topmenu.phtml
Get an extension to do it for you.
Hire a developer to do it for you, we create a static block with installer for the html which make it slightly more user friendly to update in the future.
Stackoverflow is a bad place to ask questions like this, it is aimed at programmers and doing such a procedure is rudimentary stuff, I really hope you are a client trying to be cheap rather than someone who claims they can run this site.
Edit: The cms features are ok but you need to be able to code to set them all up so the end user can make the changes with WYSIWYG.
If you don't want to code for navigation then you can do below things
1) Create category and then Display Settings=>Display Mode=>static block only and Display Settings=>CMS Block=>static block name. In static block u can include in page url or custom page
2)You need to hire developer
If you're using Magento and have an integrated WordPress blog, it's possible to design a completely custom menu in the WordPress Admin using the menu builder. You have complete control over what menu items you want and the hierarchy of each item.
To get this to work, you need to integrate your WordPress blog using WordPress Integration in full integration mode. Your Magento template also has to be using the default Topmenu block.

wordpress help... integrating existing PHP code to work side-by-side

I know very little of WP aside form it being a CMS geared towards (or started from) blogging, but may people have found the product capable of functioning as their sites CMS.
I was recently asked to write a PHP app to signup, (with email confirm and email notification to admin), login to make and manage orders. - so a user can register and get an email confirmation... once they are approved, they can log in, and place an order. and manage their information. There is also an admin section to manage the users and requests... ALL very straight ahead.
So I write it - and test it and everything is fine... Until the client tells me that it's going to be part of a WP site.
Problem, the client ONLY knows HTML, NOT PHP... I don't know WP.
When I upload a directory to the root - and try to run the app, I get redirect to /$url .. and a page not found displaying in the WP theme.
I have a feeling it has to do with the AUTH module I'm using... but there is a huge BIG PICTURE issue I need to conquer - how to integrate an existing PHP app into a WP site...
Q: how do I reference and use the WP emailing system?
thx - I know it's a broad question. but if someone can point me into a direction...
I have read the post regarding templates in WP and setting up a template with PHP code so it's executed... but it seems 'wrong' to have to create a template for each php page.
What your app is about ? If you got only the Auth module already coded you should only import user and password because WP does this out-of-the-box.
Wordpress can be twist up for your need but you need to do it in the WP way :).
If you want to add some functions to it check out the plugin library on wordpress.org. If you know wordpress and no plugin match your needs then the best way to go is writing your own plugin : https://codex.wordpress.org/Writing_a_Plugin
Or maybe just add your custom functions into functions.php, see https://codex.wordpress.org/Theme_Development#Functions_File
For pages, you basically have to type of it in WP : articles - i.e. blog posts - and the static pages. You can add some custom one check https://codex.wordpress.org/Post_Types
I know this answer is more a bunch of links but if you don't nothing about WP you should first learn how it works before try to hack it.
Hope it helps !

Categories