Adding pubsubhubbub link tag to Atom feed - publish-subscribe

According to Google the link tag containing the URL to the pubsubhubbub hub (This is a really terrible name) needs to go under the Atom entry element like so:
<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-GB" xmlns="http://www.w3.org/2005/Atom">
<!-- ... -->
<entry>
<link rel="hub" href="https://pubsubhubbub.appspot.com/" />
<!-- ... -->
</entry>
</feed>
However, all the implementations and blog posts I have seen add it to the feed element instead like so:
<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-GB" xmlns="http://www.w3.org/2005/Atom">
<!-- ... -->
<link rel="hub" href="https://pubsubhubbub.appspot.com/" />
<entry>
<!-- ... -->
</entry>
</feed>
What is the correct location for it?

It should be at the feed level: http://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.3.html#discovery (that is btw. the same spec, Google is referencing).

Related

How to override language files in Typo3 version 7.6?

I really need to know how to override languagefiles from extensions. For example, I have powermail installed and I have one language file from that extension that I need to override.
So I've got an extension called website_head and in that I created the file:
typo3conf\ext\website_head\Resources\Private\Language\Overrides\powermail\Resources\Private\Language\locallang.xlf
And the file I want to override is:
typo3conf\ext\powermail\Resources\Private\Language\locallang.xlf
When I clear the caches it does not change (but when I change the original it does change the text, it's just not overriding)
Also this is what's inside the override locallang.xlf file:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2014-05-02T12:00:00Z" product-name="powermail">
<header/>
<body>
<trans-unit id="validationerror_mandatory">
<source>Custom text</source>
</trans-unit>
</body>
</file>
</xliff>
Have a look at https://docs.typo3.org/typo3cms/CoreApiReference/7.6/Internationalization/Translation/Index.html:
You probably need to:
1) declare your XLF:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:powermail/Resources/Private/Language/locallang.xlf'][] = 'EXT:website_head/Resources/Private/Language/Overrides/powermail/Resources/Private/Language/custom.xlf';
2) override a label:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2013-03-09T18:44:59Z" product-name="website_head">
<header/>
<body>
<trans-unit id="validationerror_mandatory" xml:space="preserve">
<source>Custom text</source>
</trans-unit>
</body>
</file>
</xliff>

Eclipse EE Kepler Spring MVC unable to locate views in .html/.jsp

I'm new to Spring MVC. I'm trying out simple projects like Hello World.
I originally created a Hello World using IntelliJ IDEA IDE which worked just fine. However, when I tried Eclipse EE IDE, it returned a 404 message
HTTP Status 404 -
type Status report
message
description The requested resource is not available.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>FirstSpringMVCProject</display-name>
<servlet>
<servlet-name>spring-dispatcher</servlet-name> <!-- spring-dispatcher is the file named spring-dispatcher-servlet.xml -->
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>spring-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
spring-dispatcher.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:component-scan base-package="com.springmvcproject" />
<!-- HandlerMapping class -->
<!-- There are plenty of handler mapping classes, this is just an example of one of the classes available -->
<bean id="HandlerMapping" class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping" />
<!-- defines the location or path where to look for views and what file extension to look for -->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
HelloController.java
package com.springmvcproject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
#Controller
public class HelloController {
#RequestMapping("/hello")
public String helloWorld(){
return "hellopage";
}
}
hellopage.jsp
<%# page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h4> This is the hello page (HelloPage.jsp)</h4>
</body>
</html>
I don't see any reasons why it will not display the contents of the hellopage.jsp when I try to access http://localhost:8080/FirstSpringMVCProject/hello
Here's the screenshot of the folder structure. There are no warnings or error.
I don't know if I just missed something here or if Eclipse is requiring something else.
I hope you can help.
Thank you.

Importing local classes in Haxe

I'm starting my first serious project in Haxe, but I've hit somewhat of a snag.
The problem is that if I try writing a class in a file other than my Main.hx, it is not being compiled. I've tried using import but that does not seem to work.
I'm using vim as a my ide with a few nice plugins(Youcompleteme, syntastic and vaxe) and the only haxelib is openfl.
Here is the boilerplate being created when I use the command openfl create project :
Project.xml
<?xml version="1.0" encoding="utf-8"?>
<project>
<meta title="ProjetSession" package="com.sample.projetsession" version="1.0.0" company="Company Name" />
<app main="Main" path="Export" file="ProjetSession" />
<source path="Source" />
<haxelib name="openfl" />
<assets path="Assets" rename="assets" exclude="openfl.svg" />
<icon path="Assets/openfl.svg" />
</project>
ProjetSession.hxproj
<?xml version="1.0" encoding="utf-8"?>
<project version="2">
<!-- Output SWF options -->
<output>
<movie outputType="CustomBuild" />
<movie input="" />
<movie path="project.xml" />
<movie fps="30" />
<movie width="800" />
<movie height="600" />
<movie version="1" />
<movie minorVersion="0" />
<movie platform="Lime" />
<movie background="#FFFFFF" />
<movie preferredSDK=";3;" />
</output>
<!-- Other classes to be compiled into your SWF -->
<classpaths>
<class path="D:\Development\Haxe\openfl" />
<class path="d:\Development\Haxe\lime" />
<class path="Source" />
<class path="Export\html5\haxe" />
</classpaths>
<!-- Build options -->
<build>
<option directives="openfl=3.0.0-beta
lime=2.1.3
tools=2.1.3
no-compilation
openfl-html5
canvas
lime-html5
html5
web
html5" />
<option flashStrict="False" />
<option noInlineOnDebug="False" />
<option mainClass="ApplicationMain" />
<option enabledebug="False" />
<option additional="--remap flash:openfl
--macro allowPackage("flash")" />
</build>
<!-- haxelib libraries -->
<haxelib>
<!-- example: <library name="..." /> -->
</haxelib>
<!-- Class files to compile (other referenced classes will automatically be included) -->
<compileTargets>
<!-- example: <compile path="..." /> -->
</compileTargets>
<!-- Paths to exclude from the Project Explorer tree -->
<hiddenPaths>
<hidden path="obj" />
</hiddenPaths>
<!-- Executed before build -->
<preBuildCommand>"$(CompilerPath)/haxelib" run lime build "$(OutputFile)" $(TargetBuild) -$(BuildConfig) -Dfdb</preBuildCommand>
<!-- Executed after build -->
<postBuildCommand alwaysRun="False" />
<!-- Other project options -->
<options>
<option showHiddenPaths="False" />
<option testMovie="Custom" />
<option testMovieCommand="" />
</options>
<!-- Plugin storage -->
<storage />
</project>
The hml file is automatically generated by vaxe.
Defining a class and importing it, it is not sufficient to have that class compiled in your output. What you need is to actually "use" it. That can be accomplished by referring your class in your main function. To do that just use the class directly or use any other code that refer that class directly or indirectly.
This is a big advantage of the language that doesn't overload the output of your app with unneeded code. That also means that you can use third party libraries with confidence, knowing that only the bits of library you use will be embedded in your output.

Typo3 Fluidtemplate multilanguage how to?

I use this Typoscript code:
lib.search = FLUIDTEMPLATE
lib.search.file = {$partialsTemplatesPath}search.html
Whats the best way to use multilanguage inside this Fluidtemplate?
Using lib.search.variables and GP:L conditions cant be the best way, right?
UPDATE:
Template:
<f:translate key="LLL:{locallangPath}locallang.xlf:search" />
XLF File:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2013-10-21T12:50:51Z" product-name="content">
<header/>
<body>
<trans-unit id="search">
<source>Search</source>
</trans-unit>
</body>
</file>
</xliff>
Translated XLF (de.locallang.xlf):
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="de" datatype="plaintext" original="messages" date="2013-10-21T12:50:51Z" product-name="content">
<header/>
<body>
<trans-unit id="search">
<target>Suche</target>
</trans-unit>
</body>
</file>
</xliff>
This is the right way I guess. But the output is only "Search" and not "Suche". Did I miss something?
For the translated one you have to specify source AND target language:
take a look at:
http://docs.typo3.org/typo3cms/CoreApiReference/6.2/Internationalization/Introduction/Index.html
hope that works for you...
You can use the translate viewhelper inside of your fluidtemplate.
See: https://fedext.net/viewhelpers/fluid/TranslateViewHelper.html

Build folder stays empty

Hi Im trying to follow the tutorial here regarding Struts. I have followed the tutorial exactly but am getting an HTTP 404 error. I know this error basically means that the resource can't be found be the the IDE.
I noticed that the 'Build' folder is actually completely empty - so I'm guessing that it should have automatically created a runnable project based on my project specifics and this is actually where the server looks in order to run an application.
So how do I go about manually generating this file? Should I drag all the resources in? Java classes, JSP files and so? If not how do I configure it to automatically build?
Cheers
EDIT
Have added what I think will be necessary to help solve this:
Web.xml Located in the WEB-INF folder, next to lib
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts2 Application</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>Login.jsp</welcome-file>
</welcome-file-list>
Struts.xml Located in a src folder called resources in the Java Resources folder
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="false" />
<constant name="struts.custom.i18n.resources" value="ApplicationResources" />
<package name="default" extends="struts-default" namespace="/">
<!--
If we changed from the default execute() method, which struts looks for
to say authenticate(), then we would have to specify this in the action
method below like this:
<action
name="login"
method="authenticate"
class="net.viralpatel.struts2.LoginAction">
</action>
-->
<action name="login" class="net.viralpatel.struts2.LoginAction">
<result name="success">Welcome.jsp</result>
<result name="error">Login.jsp</result>
</action>
</package>