1
elsanto
Smarty cache xoops_page_title
  • 2010/1/20 11:51

  • elsanto

  • Just popping in

  • Posts: 18

  • Since: 2009/1/5 1


Hello, sorry for the mistakes of language, I use the google translator.

A long time ago that we should XOOPS this function. Nobody wants to cache the modules because the information is lost the title page and we all know how important it is for a good position in search engines.

With my little knowledge of php I have been reviewing the code cache system and I think the solution should be implemented at the top of the page cache, where the labels are "template", "timestamp", "expires" and others.

275 a:5:{s:8:"template";a:3:{s:18:"db:news_index.html";b:1;s:17:"db:news_item.html";b:1;s:34:"db:system_notification_select.html";b:1;}s:9:"timestamp";i:1263984313;s:7:"expires";i:1264070713;s:14:"cachepagetitle";s:30:"http://localhost/xo243/uploads";s:13:"cache_serials";a:0:{}}   <div style="text-align: center;">     <form name="form1" action="http://localhost/xo243/modules/news/index.php" method="get">     <select name="storytopic" id="storytopic" ><option value="0">option><option value="1">[es]Vinos[/es][en]Wine[/en][ca]Vi[/ca]option>select> <select name="storynum"><option value="5" selected="selected">5option><option value="10">10option><option value="15">15option><option value="20">20option><option value="25">25option><option value="30">30option>select> <input type="submit" value="Continuar" class="formButton" />form>   <hr />   div>


As shown in the following ratecontrol code of cached pages I managed to insert a more tag called "cachepagetitle" = XOOPS_UPLOAD_URL

I could only take the first step of this need for xoops, putting in the file / class / smarty / internals / core.write_file.php as shown in the last line of code below.

function smarty_core_write_cache_file($params, &$smarty) {   

$smarty->_cache_info['timestamp'] = time();     
if (
$smarty->cache_lifetime > -1){ 
$smarty->_cache_info['expires'] = $smarty->_cache_info['timestamp'] + $smarty->cache_lifetime;     
} else {  
$smarty->_cache_info['expires'] = -1;     
}          
$smarty->_cache_info['cachepagetitle'] = XOOPS_UPLOAD_URL;



I put it XOOPS_UPLOAD_URL not like putting xoops_page_title and still lack the most difficult, to read the label and pass it to the template.

Will I be able to help? If you can solve this should be implemented in future versions of xoops.

Thank you very much.

2
elsanto
Re: Smarty cache xoops_page_title
  • 2010/1/21 22:13

  • elsanto

  • Just popping in

  • Posts: 18

  • Since: 2009/1/5 1


Gracias Trabis. Si yo llegara a tener algun avance lo iré escribiendo en este post, pero lo dudo porque me cuesta mucho entender las clases de xoops.

Login

Who's Online

216 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

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

Latest GitHub Commits