news

Bootnewage CPanel theme (Beta release)

Published by timgno on 21-Mar-2015 10:09 (4605 )
I am happy to introduce a new CPanel (Admin) theme for XOOPS, completely rewritten with Bootstrap, in order to provide visibility and compatibility with different mobile devices.

It is important to stress that unfortunately, with versions of XOOPS 2.5.x that support Bootstrap, this Admin theme may not work properly. Therefore this Beta version should be tested first locally, before using it in a production site.

I have changed many file in the System module, in addition to many other Core files, so it is necessary to do the tests on a fresh installation of XOOPS on your localhost, because if there is incompatibility with this new code, you're not risking anything.

However, even the Default theme will be changed, to avoid any problems.

This below is a screenshot of the theme that can be modified in various colors just like the default theme.

Resized Image


Libraries used:
- bootstrap.css 3.3.2
- bootstrap.theme.css 3.3.2
- bootstrap.min.js 3.3.2
- jquery.min.js 1.11.2
- jquery-ui.min.js 1.10.4

As I wrote in this thread for some problems, you might find difficulty with some features.

I must point out that in the package there are other themes, in addition to the default, but they are not complete like this one. You can still edit them to your liking in the expectation that we can use in production.

See all collaction on Flickr

Download Pack

To report issues or provide feedback, please go to this thread.

Headline News Publisher

Published by heyula on 26-Sep-2014 11:37 (5129 )
Resized Image


theme.html Code :
<link href="<{xoImgUrl css/mansetx.css}>" type="text/css" rel="stylesheet" />  
<
script type="text/javascript" src="<{xoImgUrl js/mansetx.js}>"></script>
<
script type="text/javascript" src="<{xoImgUrl js/jquery-1.11.1.js}>"></script>


theme.html add :

<{includeq file="$theme_name/slidetpublisher.html"}>



slidetpublisher.html code :

<{php}>
include_once 
XOOPS_ROOT_PATH '/modules/publisher/include/common.php';
$publisher =& PublisherPublisher::getInstance();
$myts =& MyTextSanitizer::getInstance();
$itemsObj $publisher->getHandler('item')->getItems($limit 6$start 0, array(_PUBLISHER_STATUS_PUBLISHED), -1$sort 'datesub'$order='DESC'''true$criteria nulltrue);
$totalItems count($itemsObj);

global 
$items;
$items = array();
if (
$itemsObj) {
        for ( 
$i 0$i $totalItems$i++ ) {

            
$newItems['itemid']       = $itemsObj[$i]->itemid();
            
$newItems['title']        = $itemsObj[$i]->title();
            
$newItems['body']         = $itemsObj[$i]->body();
            
$newItems['votes']        = $itemsObj[$i]->votes();
            
$newItems['image']        = XOOPS_URL '/uploads/blank.gif';
            
$images $itemsObj[$i]->getImages();
            if (
is_object($images['main'])) {
                
$newItems['image'] = XOOPS_URL '/uploads/' $images['main']->getVar('image_name');
            }
        
$items[] = $newItems;
    }
}
<{/
php}>
        <
div id="mansetx">
            <{
php}>
        foreach ( 
$GLOBALS['items'] as $myrow )
        {
        
$GLOBALS['xoopsTpl']->assign('itemid'$myrow['itemid']);
        
$GLOBALS['xoopsTpl']->assign('title'$myrow['title']);
        
$GLOBALS['xoopsTpl']->assign('body'$myrow['body']);
        
$GLOBALS['xoopsTpl']->assign('votes'$myrow['votes']);
        
$GLOBALS['xoopsTpl']->assign('image'$myrow['image']);
<{/
php}>
        <
div id="mansetx-img">
            <
a href="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$itemid}>"><img width="720" height="315" src="<{$image}>"></a>
        </
div>
         <{
php}>
        }
<{/
php}> 
        <
div id="mansetx-selector">
            <
ul>
            </
ul>
        </
div>
</
div>


Demo :

http://estetikameliyatmerkezi.com/xoopson/

Hasta Yatakları

Facebook comments added to Publisher module version 1.02

Published by ipwgc on 26-Sep-2014 06:05 (4340 )
Hi,
I did it, I added the fecebook comment in publisher module version 1.02

1. I Work with publisher version 1.02
2. and the theme xbootstrap version 1.02
3. I have to prepare a winzip if you want

If you want to see how it looks, takes a look here
CLICK HERE

Regards
DAVID

Resized Image

TDMDownloads Block Views

Published by heyula on 13-May-2013 14:46 (4069 )
TDMDownloads 1.6 :
------------------------------
tdmdownloads_block_top.html
tdmdownloads_block_new.html
------------------------------
Resized Image


Demo :
http://www.programgezgini.com/

Downloads :
http://www.programgezgini.com/modules ... s/singlefile.php?lid=1184

XoopsFaq / jQuery Plugin: fancy FAQs

Published by heyula on 25-Mar-2013 12:55 (5025 )
Resized Image

Xoops Faq view

scripts folder / modules/xoopsfaq/templates
images folder / modules/xoopsfaq/images
xoopsfaq_category.html / modules/xoopsfaq/templates

Download : https://sourceforge.net/projects/xoopstr/files/Hack/

Demo : http://evsad.org.tr/modules/xoopsfaq/index.php?cat_id=1

Publisher News Views - Hack

Published by heyula on 24-Mar-2013 21:03 (4488 )
The team on Xoops-tr.com did some improvements in the Publisher, improving on the View, and we wanted to share with all XOOPS users.

Big thanks to Trabis once again for this module.

publisher_display_wfsection.html

Ekran Görüntüleri / Screenshots :

Stil - 1 :

Resized Image


Stil - 2 :

Resized Image


Demo : http://evsad.org.tr/modules/publisher/

Download : http://www.programgezgini.com/modules ... s/singlefile.php?lid=1149

Amazon EC2 and Elastic Load Balancing with XOOPS ...

Published by wishcraft on 30-Sep-2012 10:29 (6090 )
Amazon EC2 and Elastic Load Balancing with XOOPS
Whitepaper by Simon Roberts (of Sydney) - wishcraft

Download Whitepaper: [url=http://code.google.com/p/chronolabs/downloads/detail?name=XOOPS%20and%20Amazon%20EC2%20with%20ELB%20Services.pdf]XOOPS and Amazon EC2 with ELB Services.pdf[url] - 100Kb

Contribution Notices
I would like to thank the following people and organisations for their assistance with the Amazon ec2 and subset of systems, without their institutive understanding and association with Amazon this technical whitepaper would not exist.

ICE Systems:
Quote:
I would like to thank for the establishment of the EC2 cloud in this instance, Peter Barganski from ICE System for his ability to navigate and configure the Amazon cloud. ICE System's is a reseller and Amazon Partner and have provided me with quick and fast responsive and adaptive environment needed for the Lunchalot.com system we are designing.


lunchalot.com:
Quote:
Secondly I would like to thank my employer, lunchalot.com (contact@lunchalot.com) for so quickly choosing XOOPS as the framework to move their existing web infrastructure over to and in particular Richard the CEO enthusiasm for moving the Proof-of-concept web infrastructure into XOOPS and the team for all their hours testing.


Preface
This whitepaper is to describe the process involved in defining Amazon's EC2 with Elastic Load Balancing with the XOOPS Portal System. It is designed to be used with XOOPS 2.5 or later, and the associate files are provided as per GNU licensing of the source. ELB or Elastic Load Balancing within Amazon's EC2 cloud, is the process, where an ELB service will start up as per requirement instances of a website image supporting your website.

When ELB is in place, the Amazon cloud will start up and direct traffic to multiple instances of your website as per the traffic requirement of the site. This all depends on what sort of instances you are using and its capabilities. All the files provided have been tested and are designed to be used with Amazons Ubuntu services.

This sort of service will be required with a site that has a heavy traffic requirement that a single VPS or Private server cannot cope with and when you need multiple services. Why would you use Amazon to do this, well I will quote Peter from ICE Systems on this that ELB services until Amazon made them available where finitely unaffordable and out of reach of even the most durable business intake. As the costs of installing and hosting the services manually where just unjustifiable for most businesses.

This white paper will concentrate on the XOOPS system itself and preparing the CMS/Portal system for the Amazon EC2 environment with ELB in place, some of the systems it describe you will either have to research or employ someone like ICE systems to deploy for you as they contain information which may vary between installations and environment as well as being outside the scope of the documents description.

Anything which is unique to the system this was designed on due to intellectual property rights have been omitted there will be notation in the document as designed or put in generalised terms of reference for use in your own systems.

JQuery UI datepicker

Published by timgno on 28-Jun-2012 09:52 (8026 )
Some time ago on my site, we talked about inserting a plugin datetimepicker that you can insert into a class on xoops. In this news I announce that I have created a special class in the folder class/xoopsform as formdatepicker.php. The result is being able to delete many files from the old calendar, and use a simple method call using the id #datepicker and using the datepicker plugin of jquery datepicker.js
 
A simple example shows images:
Resized Image


Resized Image


Resized Image


will receive the form by clicking on the icon to the right of the text field, if the icon is activated, or just click in the text field to display the calendar ui jquery.

Read Original News

Solving ajax giving cross-domain error or responding empty

Published by culex on 09-Mar-2012 17:07 (8096 )
When assigning XOOPS_URL to a javascript variable in eighter preloads or specific pages.

Most often the browser will deny your request and return only an empty respond. But not give error. This can be seen in FireBug's console when the requests is returning code "200 OK" but text is in red color = empty result. Very annoying

The problem is between Xoops Cookie and browser. I noticed this when being logged in to a xoops page and closing the page without logging out. When re-opened the ajax running in my preloads (in this case XIM and Smallworld) was denying sending messages or posting to the wall.

Also this is a problem if you log out from http://domain.com and open http://www.domain.com.

There are as I see this 2 solutions.

1) Everytime you finish browsing do log out.

Another solution is to define the javascript var used in ajax requests according to actual browser adress.

Add a function to your page (if you add to include/functions.php remember to include this page in preloads or the page your working on)

/**
     * @Get url of smallworld
     * @returns string
     */ 
    
function smallworld_getHostRequest() 
    {
        
$protocol strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE 'http' 'https';
        
$host     $_SERVER['HTTP_HOST'];
        
$script   $_SERVER['SCRIPT_NAME'];
        
$params   $_SERVER['QUERY_STRING'];
        
$currentUrl $protocol '://' $host;
        return 
$currentUrl;
    }


In your page reset the var like this
// Check if request url is with www or without
        
global $xoTheme;
        
$urltest smallworld_getHostRequest();
        
$xoops_url XOOPS_URL;
        if (!
strstr($urltest'www.')) {
            
$xoops_url str_replace'www.'''$xoops_url );
        }

        
$script "var smallworld_url = '" $xoops_url "/modules/smallworld/" "';n";
        
$xoTheme->addScript('','',$script);


The var smallworld_url will now be according to your browser adress and this way not result in ajax cross-browser error.

Social Media quick tutorial for XOOPS

Published by aberdeenman on 03-Mar-2012 11:07 (6981 )
First of all, you are more than welcome to use any of this, most of what I've done was pieced together from my own bug/debug process.

I use everything here on my news website at http://kbkw.com
I think I included everything, but please feel free to contact me if you have questions.

This could all be seen as continuation of this article at https://xoops.org/modules/news/article.php?storyid=6044


META
I add the following to my Meta tags (In the template)

<meta property="og:type" content="article"/>
  <
meta property="og:locale" content="en_US" />
  <
meta property="og:image" content="<{$xoops_url}>/YOUR LOGO.png" />
  <
meta property="og:site_name" content="<{$xoops_sitename}>"/>
  <
meta property="fb:admins" content="FB ADMINS FOR THE SITE"/>


I add some If/Then statements that will populate other facebook values IF we're viewing a story. (IF the story.hits variable is empty then we're not viewing an article)

<{if $story.hits !=''}>
   <
meta name="description" content="<{$story.news_title|strip_tags:false}> : <{$story.text|strip_tags:false|truncate:120:"..."}>" />
   <
meta property="og:description" content="<{$story.text|strip_tags:false|truncate:120:"..."}>" />
   <
meta property="og:title" content="<{$story.news_title|strip_tags:false|truncate:120:"..."}>"/>
   <
meta property="og:url" content="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" />


Same as above, but for the debaser module

<{elseif $addinfo != ''}>
   <
meta name="description" content="<{$addinfo|strip_tags:true|truncate:220:"..."}>" />
   <
meta property="og:description" content="<{$addinfo|strip_tags:true|truncate:220:"..."}>" />
   <
meta property="og:title" content="<{$title}>"/>
   <
meta property="og:url" content="<{$xoops_url}>/modules/debaser/singlefile.php?id=<{$id}>" />


This uses news 1.65's "Select a picture to attach to the news"

<{if $articlePicture != ''}>
       <
meta property="og:image" content="<{$articlePicture}>" />
       <{/if}>


then from here down we populate variables for the "rest of the pages," and close out our IF statement

<{else}>
  <
meta name="description" content="<{$xoops_pagetitle}>, <{$xoops_meta_description}>" />
  <
meta property="og:title" content="<{$xoops_pagetitle}>"/>
 <{/if}>



lastly I add keywords because facebook pulls this meta before it's own for some reason..

<meta name="keywords" content="<{$xoops_pagetitle}>, <{$xoops_meta_keywords}>" />




TEMPLATES
Now in the news_item.html template I add a check for the proper topic:

<{if $story.topic_title|strip_tags:false == "Local News"}>


Followed by my "social bar"

<!-- Social BEGIN -->
<
div class="addthis_toolbox addthis_default_style ">
  <
class="addthis_button_facebook_like" fb:like:layout="button_count" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>"></a>
<
class="addthis_button_tweet" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>"></a>
<
class="addthis_button_google_plusone" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>" g:plusone:size="medium"></a>

<{if 
$articlePicture != ''}>
  <
a href="http://pinterest.com/pin/create/button/?url=<{$xoops_url}>/modules/news/article.php?storyid%3D<{$story.id}>&media=<{$articlePicture}>&description=<{$story.news_title|strip_tags:false}> - <{$story.text|strip_tags:false|truncate:320:"..."}>" class="pin-it-button" count-layout="horizontal">Pin It</a>
    <{else}>
        <
a href="http://pinterest.com/pin/create/button/?url=<{$xoops_url}>/modules/news/article.php?storyid%3D<{$story.id}>&media=<{$xoops_url}>/logo.png&description=<{$story.news_title|strip_tags:false}> - <{$story.text|strip_tags:true|truncate:320:"..."}>" class="pin-it-button" count-layout="horizontal">Pin It</a>
<{/if}>

  <
class="addthis_counter addthis_pill_style" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>"></a>
</
div>

  <
script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=YOUR PUB ID" addthis:url="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>" addthis:title="<{$story.news_title|strip_tags:true}>"></script>
  <!-- 
Social END -->


By adding this in the news_item template instead of _article, You see the social icons at the bottom of every story when viewing the entire topic - and the links track through to the stories, so you could "like" every story on a page with a few clicks.


**Note: Pinterest requires this additional js at the top of the page (I put mine in both news_index.html and news_article.html

<script type="text/javascript">
(function() {
    
window.PinIt window.PinIt || { loaded:false };
    if (
window.PinIt.loaded) return;
    
window.PinIt.loaded true;
    function 
async_load(){
        var 
document.createElement("script");
        
s.type "text/javascript";
        
s.async true;
        if (
window.location.protocol == "https:")
            
s.src "https://assets.pinterest.com/js/pinit.js";
        else
            
s.src "http://assets.pinterest.com/js/pinit.js";
        var 
document.getElementsByTagName("script")[0];
        
x.parentNode.insertBefore(sx);
    }
    if (
window.attachEvent)
        
window.attachEvent("onload"async_load);
    else
        
window.addEventListener("load"async_loadfalse);
})();
</
script>



Finally, I add the following code near the bottom of the news_article.html template for the "Chat" plugin from facebook

<fb:comments numposts="15" <div class="fb-comments" data-href="<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>"></fb:comments>

Xoops Html Classes v1.1

Published by timgno on 19-Jan-2012 14:26 (4165 )
In the previous version, I included only three classes in the package, it will include 19 excluding of course the form tag we already use with classes xoopsform. It can then use these classes directly in xoops since I added the needed files from libraries that attract the same classes in the core.

xoopshtmlloader.php
xoopsload.php

It 's always recommended to test in locally, using a virtual server like WampServer, in tutorials, in the same section explains how to integrate them in our files for xoops.

In the class/xoopshtml folder, are included these class files:

xoopshtmlanchor.php
xoopshtmlanchoredlistitem.php
xoopshtmlblock.php
xoopshtmlbookmark.php
xoopshtmlcomment.php
xoopshtmlelement.php
xoopshtmlheader.php
xoopshtmlimage.php
xoopshtmlimageanchor.php
xoopshtmllist.php
xoopshtmllistitem.php
xoopshtmlpage.php
xoopshtmlparagraph.php
xoopshtmlspan.php
xoopshtmltable.php
xoopshtmltablecaption.php
xoopshtmltablecell.php
xoopshtmltableheadercell.php
xoopshtmltablerow.php

It is considering whether it was necessary to include other classes, as more and more, than mentioned above, the html tags.

Download

Thread

Soon it will be appropriate explication for this created a tutorial in the tutorial section of my site

Timgno - TXMod Xoops Team

Homepage of your site v1.2

Published by timgno on 02-Dec-2011 00:17 (3486 )
Homepage of your site v1.2

A new test for creating a personalized homepage directly from the System Administration. This new version allows you to store images and text in the database for display on the homepage. Ability to enable and disable options for editors such as HTML, smiley, xcodes, images, break, and various editors to manage content in different parts of the homepage.

Create a table so the homepage, find the sql file attached to the zip package, make a backup of the affected files and then overwrite them.

Download the package from here

View this forum

ADODB 0.24 - Advanced Database Perfomance

Published by wishcraft on 05-Oct-2011 10:03 (4715 )
Resized Image
ADODB 0.24 - Advanced Database Performance Enhancement

ADODB is a PHP library available from sourceforge, this is not to be confused for the PHP Extension ADODB they are too seperate things. There is of course a major bottle neck in the current database library where this patch will improve performace upto 1000% with XOOPS 2.3, XOOPS 2.4 & XOOPS 2.5.

It has been awhile coming and we will have some benchmarking for you in the next day or two we are currently running the tests on our Blade Server with 16Gbs of Memory which has minimal load to get an accurate respository of exactly how ADO Db performs in the XOOPS Classes.

To install this simply download the files and replace them in the directory tree class folder.

Download: xoops2.5_adodb_0.24.zip
Sourceforge: xoops2.5_adodb_0.24.zip
Demo: http://xoops.demo.chronolabs.coop

Xoops Global RSS Hack/Solution

Published by kerkyra on 15-Sep-2011 14:40 (6195 )
This is a modified version of backend.php, that offers one way of gathering rss feeds from every module that you'd like and displaying them.
Resized Image


All you have to do is replace the backend.php file with the one in the download package.

Add a file in the modules folder /incude/rss.inc.php

The function name must be modulename_rss()

There is an example of the calendar module and smartsection in the package as well.

It actually works like the search functionality works in xoops but you dont have to change or declare anything on xoops_version.php of each file.

I did that cause i didnt want to change any module core files for it to work.

I have also updated the system_rss.html template (you dont need to (for it to work) but it is included in case you prefer the new one)

If anyone else implements this please share the files for other modules too and send them to me so i can include them in the package.

Download from here

Adding Facebook's Comments Box to XOOPS News Module

Published by Mamba on 16-Aug-2011 08:57 (11424 )
Bigwolf asked recently about where to add Facebook's Comment Box code in the News module.

Here is a quick tutorial how to hack the News module to make it happen:

1) You need to create a Facebook Application for your XOOPS site, and fill out all the fields there:

Resized Image

Make sure that your URL ends with "/"

2) Once you properly fill out the form, and click on the "Create App" button, Facebook wants to make sure that you're a real person or a very smart bot:

Resized Image

3) Once you pass the security check, you'll see your Settings Page with your Application ID and Application Secret:

Resized Image

4) Now go to the Facebook Social Comments Website. Fill out the form with your data: your Website URL, number of default comments to be shown, and how wide should be the comment box, which will depend on your theme that you're using:

Resized Image

(Please note: you can change the settings later in your code)

5) Click on the "Get Code" button, and get your code:

Resized Image

//begin of correction

6) Go to the file news_article.html located in the /templates directory in your News module, and place your code close to the end of the file, right before:

<div class="pad2 marg2">


and replace the "mysite.com" URL with Smarty:

<{$xoops_url}>/modules/news/article.php?storyid=<{$story.id}>


Resized Image

This will give you a backlink to the current article

//end of correction

7) Save it, make sure that in your Admin Preferences (General Settings) the "Check templates for modifications ?" is set to "Yes", and check out your News - you should see a Facebook Comments Box under your article:

Resized Image

That should do it. Have fun Xoopsing
------------------------------------------
[EDIT] Aberdeenman posted another interesting hack dealing with Social Media:

https://xoops.org/modules/news/article.php?storyid=6236