1
Cubiq
Re: Easiest reviews module
  • 2005/1/6 10:15

  • Cubiq

  • Just popping in

  • Posts: 7

  • Since: 2004/11/23


Quote:

brash wrote:
You could try Articles 0.18 or SmartSection.


Thanks for your quick reply.
Articles does not have alphabetical article browsing nor rating system I'm afraid... I'll try smartSection but I suppose it has the same limitations.



2
Cubiq
Easiest reviews module
  • 2005/1/6 9:56

  • Cubiq

  • Just popping in

  • Posts: 7

  • Since: 2004/11/23


I'm looking for a really easy reviews module for XOOPS that does more or less the same things of the one in phpn*ke (an example:http://caustictruths.com/modules.php?name=Reviews ). Does it exist?

I tried myReviews but it's too much for my needs (and a little buggy too). Any suggestions?

I was thinking about modding myDownload module that is near to what I want but... possible nobody did it already?

Thanks



3
Cubiq
4 Tips for xoops
  • 2004/12/12 12:03

  • Cubiq

  • Just popping in

  • Posts: 7

  • Since: 2004/11/23


I'm sending these tips I use on my site in the hope you could find them useful. Maybe someone could tell better ways to do these tasks as well.

------------
Per page meta tags with no hacks
For good search engine ranking is vital to be able to change meta tags on a per page basis.
In XOOPS it is possible to change meta-tags and page title with few lines of smarty code in "theme.html", without php coding.

All we need is to check the first 4 characters of the smarty variable $xoops_pagetitle.
$xoops_pagetitle holds the current page title that may change depending on the module you are using (eg: News module 1.0 puts just the module name in $xoops_pagetile, but News 1.2 fills the same variable with module name, news topic and title). But what all modules do is placing the module name as first thing.

All we need to do is to modify few lines inside the "head" tag in your theme.html.

Look for:

<meta name="keywords" content="<{$xoops_meta_keywords}>" />
<
meta name="description" content="<{$xoops_meta_description}>" />


Replace with:

<{if $xoops_pagetitle|truncate:4:""=="NewB" }>
<
meta name="description" content="This is the meta description will appear if you are in the NewBB module." />
<
meta name="keywords" content="meta, keywords, for, newbb, forum" />
<{elseif 
$xoops_pagetitle|truncate:4:""=="News" }>
<
meta name="description" content="Here we are in the news section." />
<
meta name="keywords" content="we, love, news" />
<{else}>
<
meta name="keywords" content="<{$xoops_meta_keywords}>" />
<
meta name="description" content="<{$xoops_meta_description}>" />
<{/if}>


What we do is checking the first 4 characters of $xoops_pagetitle variable and serving different contents depending on the module the user is browsing. This is not a per-page solution, but at least each modules may have their own meta tags. Obviously you may also change the page title for each or some modules adding the "title" tag in each if/elseif clause.

Note: Actually, with the same trick you may serve completly different layouts for each module! But I don't know if this is good for your server performances.

Important!!! Depending on your XOOPS setup and language the module name may change! Eg: this site's forum is named "Support Forums", so the first 4 characters we need to check would be "Supp" (and it should be case sensitive).

------------
"Read More..." anywhere in news body
This trick probably is not needed anymore with the latest News Module releases, but as long as XOOPS 2.0.7 comes with news 1.0 I think you may find handy this trick. No php hack required.

In your news_item.html template add wherever you want the following code:

<{if $story.morelink|count_words 2}>&nbsp;<a href="/modules/news/article.php?storyid=<{$story.id}>">Read more...</a><{/if}>


This basically checks the number of words in the $story.morelink variable. If this number is greater than 2 means that "more text" is present for that news and "Read more..." text is displayed.

Important!!! The number of words you need to check may vary depending on your language. You need to check the number of words the "comments" text in your language is formed by. The formula is: 1+(number of words the "comments" text is formed by). Eg: If you use "comment this news" the number of words you need to check is: 4.

------------
New PMs in any block
The following code may be used to show in any PHP block the number of new private messages any user has.

global $xoopsUser;
if( 
$xoopsUser )
{
  
$pm_handler =& xoops_gethandler('privmessage');
  
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
  
$criteria->add(new Criteria('to_userid'$xoopsUser->getVar('uid')));
  
$pm $pm_handler->getCount($criteria);
}

if( 
$pm )
{
  echo 
"<a href="/viewpmsg.php" title="Read your new Private Messages">Private Messages ($pm)</a>n";
}
else
{
  echo 
"No new Private Messagesn";
}


The block must be a PHP block.

------------
Google AdSense strage behaviour
I noticed that if I set the news module as the homepage module sometimes AdSense is not able to show advs, but if I point explicitly to "http://sitedomain.com/modules/news/index.php" Google always feeds the banner correctly.

If you have this same issue you need to make small change in /index.php.

Search for:

header('Location: '.XOOPS_URL.'/modules/'.$xoopsConfig['startpage'].'/');


Replace with:

header('Location: '.XOOPS_URL.'/modules/'.$xoopsConfig['startpage'].'/index.php');


Now AdSense works like a charm. This issue probably comes out when your site is not yet well indexed by Google.



4
Cubiq
Xoops and XHTML
  • 2004/11/29 16:38

  • Cubiq

  • Just popping in

  • Posts: 7

  • Since: 2004/11/23


I really tried every CMS around, there's no perfect CMS but XOOPS is absolutely the more flexible.

It was a pain to make a XHTML layout the exact way I wanted it to be, but only with XOOPS I was able to do something like this: www.tetsuo.it (sorry it's italian only, but I hope you can appreciate the layout anyway).

The Site (not yet open to the masses) and layout are still in beta, something need to be tweaked for IE... I'll need another 2/3 days of optimization. Hope you like it.

I'd like to thanks the XOOPS community for the great support I found on this forum (almost all questions I was going to ask were already answered on this forum).

Last what I really miss in Xoops.
- A module-wide category manager;
- As much variables as possibile accessible from Smarty (such as User Email and "new PMs number");
();
- Customizable layout areas not just "right/left columns", "main area", "center columns".



5
Cubiq
Module name or directory
  • 2004/11/23 15:19

  • Cubiq

  • Just popping in

  • Posts: 7

  • Since: 2004/11/23


Is there a way to get the module name or module directory (just "news", "newbb", "polls", ecc) to use in Smarty so I can do something like:

<body id="<${MODULE_NAME}>">....


or

<{if $MODULE_NAME == "newbb"}>....<{/if}>


I tried with $xoops_pagetitle but it contains unpredictable contents (such as news title or forum threads title).

Another way would be to check for $xoops_requesturi but the template becomes server-dependent and it is not said that the requesturi is always assigned.

I was thinking about the following solution:

<body id="<{$xoops_pagetitle|truncate:5:""}>">...


or something like that to get the first 5 characters of the page title, but it would be nice to have the variablized module name.

Thanks




TopTop



Login

Who's Online

168 user(s) are online (123 user(s) are browsing Support Forums)


Members: 0


Guests: 168


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits