How to add php code directly into article using Jumi plugin - php

Hi every one I have installed Jumi plugin version 2.0 in joomla 1.5 and tried to write php code in the article. I'm able to use the code if I store the php source in an external file and call it within the content like {jumi [../../filename.php]}. But I'm not able to write the same code directly into the content using JCE editor. I'm getting an error like 'Jumi is working but the source needts to come under square brackets'. The problem is that I need to use a php variable output for a div tag and js also. I have no clue of how to overcome this.

Never had much luck with JUMI for that and other reasons, so switched to DirectPHP and kept the PHP right in the article itself.

Related

How to access and edit HTML Wordpress code?

I'm working on a project for my studies, building a website with WordPress. The code needs to pass the W3C HTML & CSS check and here arrives my problem. I get tons of errors and warnings, and I don't know how I can edit the code and fix them.
#1
I have tried the Appearance -> Editor thing, but I only have access to style.css, functions.php and wpml-config.xml. Plus, I don't have the rest of the CSS code, only what I wrote. (I'm using a child theme)
#2
I tried with the Chrome console to locate the mistakes by copy/pasting the code, but the Chrome console says it is on a different line from what W3C tells me. I sometimes don't even find it.
#3
So I tried to download the site files with FTP, but there is nothing written in index.php and other documents unlike what is shown on the Chrome console.
#4
My question is pretty simple, how can I access the PHP/HTML/CSS code of my website, and modify it?
This is not where you need to be, you should edit local files.
When you inspect a page with Dev Tools, you are seeing the live DOM. Which is a representation of the HTML you sent the browser along with any modification that JavaScript has made to the DOM. The W3C checker won't see content added/changed by JavaScript. You will need to validate that separately.
Your site is built with a WordPress Theme. Theme files are located at /wp-content/themes/[theme name]. The files that are in the theme folder that your site is using might look something like the Twenty Nineteen Theme.
You've already got the files (via FTP), you just need to look in the right place (see #3).

Web starter kit & php

how can I use php files using the Google web starter kit? I discovered today the Web-Starter-Kit from Google and I'm trying to get familiar with it. It works great but now I add some php code into the basic.html file and it does show in the preview file but in the /dist/ directory where the final code awaits it doesn't appear.
My question is how can I use php files using the Google web starter kit?
You should use files with extension (.php) for writing PHP code. Try changing basic.html to basic.php
Nope.
You should design the layout as normal html5 and css3 pages. Then make those static dynamic pages by replacing with php code.
Design different layout as static html pages first and then convert it to dynamic websites an easy way.

how to add joomla site header in my custom php file without using ready made plugin or module?

I have been develope one site in joomla framework. Now my trouble is that client want one custom page in this site. so, please guide me how to i setup theme interface in this custom page?
Although this is not my favorite solution, instead of including Joomla in your script, you can put your script inside an article with an extension that can read your code, like DirectPHP and others.
You can make something like error.php which is really a mini application that renders a single page. You can see in the core how elements of the emplae are used and you can evn pull in modules and so on.

Codeigniter error 500 when attempting to load lang file

I've installed Lubuntu 11.10 x86 on my home server. I previously had Win XP. The server runs well. Apache, PHP and MySQL work great except when it comes to CodeIgniter and language files. First of all php works, I've tested with non CI projects and it's fine. I've also tested a brand new CI project and I get the welcome page. I have a couple projects in CI that have 2 languages and those don't work. To isolate the problem I've copied over the home controller, view and language file. Error 500 when viewing it. If I comment out $this->lang->load('home'); it works fine. If I comment out the content of home_lang.php it works.
I've narrowed it down to the anchor helper in the language file: $lang['home.project1.image'] = anchor('portfolio', 'test'); The url helper is loaded. This worked before. Can I have anchors in the language file? How come this is causing a problem?
If you look at CodeIgniter's documentation for their Language class, they provide an overview:
The Language Class provides functions to retrieve language files and
lines of text for purposes of internationalization.
I'm not sure what's causing your server to flip out, but I'd use the language class to load text strings and wrap any links around them in your view rather than in the _lang file.

Some beginners eclipse questions

I have recently ditch Dreamweaver as my IDE for my web projects and I'm currently using Eclipse. My current web project is written in PHP, but I'm not so familiar with Eclipse yet. I downloaded the Eclipse PDT. which has all the PHP developer plugins. And my first questions when I start a project does it mean I'm creating a root folder? and shall I choose PHP project or static web project? I've choosed the PHP project,but I just need to know that I'm not choosing the wrong one.
And why is it showing an error(an exclamation mark) when I try to add some javascripts to my index.php file?
<script type="text/javascript" src="javascripts/addTools.js"></script>
when I hoover over the exclamation mark I get the following info:
Multipel annotation found at this line:
-starttag of element script
-undefined attribute name (src)
-undefined attribute name (type)
-endtag of element script
As far as I know I have used the correct syntax for adding external javascripts to a html. Seems like a bug?
I can still run the website but it is just an annoying moment, pls help me anyone?
REQUESTED SCREEN DUMP:
static web project is for a web project with only html pages. No dynamic pages with php for instance. You choose the good one.
The syntax seems correct, could you show us the full code, or even a screenshot of your editor? It seems the editor is not aware about the html dtd.

Categories