21
Venezia
Re: page generated in 0.xxx seconds
  • 2004/4/21 22:39

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


How about adding this line to the very end of footer.php, inside the last closing brace:

if ($xoopsUserIsAdmin) echo sprintf('<div align="center">Request processed in %s seconds</div>', number_format($xoopsLogger->dumpTime(),2));



22
Venezia
mylinks - email notifications not working
  • 2004/3/27 22:35

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Bug: MyLinks module does not notify users of approvals

Solution: modules/mylinks/submit.php - form

$notify_checkbox->addOption(0, _MD_NOTIFYAPPROVE);

should be

$notify_checkbox->addOption(1, _MD_NOTIFYAPPROVE);

Otherwise checkbox will always return 0




23
Venezia
Re: Changing width on new themes?
  • 2004/1/28 8:17

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Many themes use fixed widths. Check the style.css file included in your current theme.

In this particular case, in your theme.html document, the main table is defined as having an id "okvir". If you look in the style.css file that comes with the theme.html you will see that "okvir" tables are set to display at a width of 758px. You can edit the css file and change it to whatever width you like. Say 100% to fill the screen width. Of course it may have a knock on effect and you may need to adjust a few other values in the css file to get the theme to display exactly as you want it.



24
Venezia
Re: xDirectory Module bugfix for Modify Listing
  • 2003/11/10 9:28

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Also in same file: closing textarea tag needs fixed in the function modLink().



25
Venezia
xDirectory Module bugfix for Modify Listing
  • 2003/11/10 2:05

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


xDirectory module not updating modified fields correctly.

1. From user side:

Reason: missing variable assignments from posted values.

Solution:
File: modlink.php
lines 64-68 replace with:

$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$logourl = $myts->makeTboxData4Save($HTTP_POST_VARS["logourl"]);
$cid = intval($HTTP_POST_VARS["cid"]);
$title = $myts->makeTboxData4Save($HTTP_POST_VARS["title"]);
$address = $myts->makeTboxData4Save($HTTP_POST_VARS["address"]);
$address2 = $myts->makeTboxData4Save($HTTP_POST_VARS["address2"]);
$city = $myts->makeTboxData4Save($HTTP_POST_VARS["city"]);
$state = $myts->makeTboxData4Save($HTTP_POST_VARS["state"]);
$zip = $myts->makeTboxData4Save($HTTP_POST_VARS["zip"]);
$country = $myts->makeTboxData4Save($HTTP_POST_VARS["country"]);
$phone = $myts->makeTboxData4Save($HTTP_POST_VARS["phone"]);
$fax = $myts->makeTboxData4Save($HTTP_POST_VARS["fax"]);
$email = $myts->makeTboxData4Save($HTTP_POST_VARS["email"]);
$url = $myts->makeTboxData4Save($HTTP_POST_VARS["url"]);
$description = $myts->makeTareaData4Save($HTTP_POST_VARS["description"]);




2. From admin side:

Reason: Too many parameters in sprintf within SQL statement - db is trying to find a record id = time().

Solution:
File: /admin/index.php
Function: changeModReq()

Approx line 742 ~ Change the main update statement to the following (omit status param from sprintf param list):

$sql= sprintf("UPDATE %s SET cid = %u, title = '%s', address = '%s', address2 = '%s', city = '%s', state = '%s', zip = '%s', country = '%s', phone = '%s', fax = '%s', email = '%s', url = '%s', logourl = '%s', status = 2, date = %u WHERE lid = %u", $xoopsDB->prefix("xdir_links"), $cid, $title, $address, $address2, $city, $state, $zip, $country, $phone, $fax, $email, $url, $logourl, time(), $lid);

Note: the description field is handled in seperate statement, which appears ok.



26
Venezia
Re: change class of formTitle. How?
  • 2003/10/31 0:20

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


If you want to do this via css you need to change the th{} element in your theme(s) stylesheet. This of course will affect all table headers in your site, not just the ones used in forms.

If you want to alter just the XOOPS forms you will have to edit the render() function in /class/xoopsform/themeform.php - this is where the <th> tag is implemented - around line 82.

Of course not all modules draw their forms using the XOOPS form classes so you may have to edit some modules by hand via their templates and/or php files.

Venezia



27
Venezia
Re: Truncate Story
  • 2003/10/30 23:11

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


As it stands you cannot expose the news item's body text from within the block template because no variable has been passed to the XOOPS template.

The function that generates the values and passes them into the XOOPS template for this block is :

function b_news_top_show($options)

and it can be found in :

/news/blocks/news_top.php

You will have to edit this function, obtain the story text :-

1. Change line 32 - to include the "hometext" field in the db query
$sql = "SELECT storyid, title, published, hometext, expired, counter FROM ".$xoopsDB->prefix("sto... etc

2. Around line 42 add story text to the $news array as 'preview' or whatever
$news['preview'] =$myts->makeTboxData4Show($myrow["hometext"]);

3. Truncate $news['preview'] as you please.

3. In your block template reference the variable $news.preview as you please.

Good Luck
Venezia



28
Venezia
Re: $xoopsTpl - unexpected value for module name
  • 2003/10/28 1:27

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Thank you, that's the one I'm after.



29
Venezia
Re: $xoopsTpl - unexpected value for module name
  • 2003/10/27 8:20

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


Thanks.

But if we shouldn't use _tpl_vars, what is the correct way to access values that have been stored in $xoopsTpl? (from a php file, not from an html template).

I'm more interested in the values passed by the current module to $xoopsTpl rather than the values stored by the xoopsModule object.



30
Venezia
$xoopsTpl - unexpected value for module name
  • 2003/10/27 2:02

  • Venezia

  • Just popping in

  • Posts: 36

  • Since: 2003/6/24


I am calling

$xoopsTpl->_tpl_vars['module']['name']

from a small php file I am including on the first line of footer.php in order to do some central collection of values that the modules have passed to the XOOPS template.

All the values passed by the individual modules are there, all correct. But the above call to get the module name, always returns the name of the module with the highest weight, ie the last module in main menu - not the currently loaded module as expected.

I know I can use $xoopsModule to get access to the name, but I wondered if this is an oversight in the core code, or is it the responsibility of the module coders to return the correct set of values in the ['module'] array?

Thanks
Venezia




TopTop
« 1 2 (3) 4 »



Login

Who's Online

147 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

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

Latest GitHub Commits