12 #include <boost/filesystem.hpp>
17 #include <gdcore/gdCore.h>
31 void* hndl = dlopen(
"libwt.so", RTLD_NOW | RTLD_GLOBAL);
33 fprintf(stderr,
"cannot load libwt.so shared library! %s\n", dlerror());
42 : WContainerWidget(parent)
44 addStyleClass(
"WsFollowUs");
53 WContainerWidget::load();
56 std::string rootUrl = rootPath;
57 boost::replace_all(rootUrl, wApp->docRoot(),
"");
58 addWidget(
new WText(
"Follow us"));
60 pAnchorRss->addStyleClass(
"WsRss");
61 pAnchorRss->
setOption(
"debug", std::string(
"true"));
62 pAnchorRss->
setOption(
"linkType", std::string(
"InternalPath"));
63 pAnchorRss->
setOption(
"link", std::string(rootUrl +
"/ws.res/Eurofer.rss"));
64 pAnchorRss->
setOption(
"text", std::string(
"RSS"));
65 pAnchorRss->
setOption(
"icon", std::string(rootUrl +
"/ws.res/icones/RSS.png"));
66 pAnchorRss->
setOption(
"iconText", std::string(
"Eurofer RSS"));
67 pAnchorRss->
setOption(
"target", std::string(
"TargetNewWindow"));
68 addWidget(pAnchorRss);
70 pAnchorTwitter->addStyleClass(
"WsTwitter");
71 pAnchorTwitter->
setOption(
"debug", std::string(
"true"));
72 pAnchorTwitter->
setOption(
"linkType", std::string(
"Url"));
75 pAnchorTwitter->
setOption(
"icon", std::string(rootUrl +
"/ws.res/icones/twitter.png"));
77 pAnchorTwitter->
setOption(
"target", std::string(
"TargetNewWindow"));
78 addWidget(pAnchorTwitter);
102 pFU->
outOptions(
"WsModFollowUs::createContents()");
118 return "WsModFollowUs wittyShare module";
Wt::WWidget * createContents(Wt::WContainerWidget *parent=0) const
Create the contents.
static WsApplication * wsInstance()
Facility function to access the application object.
Wt::WWidget * createContentsMenuBar(Wt::WContainerWidget *parent=0) const
Create the functionalities.
const std::vector< WsOption > & options() const
Get all options.
Interface that provides differents methods for accessing the FsTree as well as other features...
WsEditorWidget * createEditor(Wt::WContainerWidget *parent=0) const
Create the contents for an editor (create a view of options).
void setOption(const std::string &attribute, boost::any value)
Set an options if previously set, update the value.
void WsModFollowUsInit(void)
WsFollowUs(Wt::WContainerWidget *parent=0)
CTor.
const boost::any & option(const std::string &attribute) const
Get an options value.
const std::string getRootPath()
return the root path of the filesystem tree, example : /var/www/demo_site
void outOptions(const std::string message)
Output all options.
void setOptions(const std::vector< WsOption > &vOptions)
Set all options.
Wt::WWidget * createAdmin(Wt::WContainerWidget *parent=0) const
Create the contents for an administrator.
std::string description() const
Return the description of the module.