11
kain
Re: IP Addresses in Forums
  • 2003/7/4 23:18

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


i'm speaking for XOOPS 1.3.8
i don't like the ip.gif so i replaced with a piece of code

in /modules/newbb/class/class.forumposts.php
find
$ip_image

and take this:
Quote:

if ( $adminview ) {
?>
<script>
function whois(url) {
test=window.open(url,'nome','SCROLLBARS=1,STATUS=NO,TOOLBAR=NO,RESIZABLE=YES,LOCATION=NO,MENU=NO,WIDTH=600,HEIGHT=400,LEFT=0,TOP=0');
}
</script>
<?php

$ip_image = "IP: <b><font color='#FF0000'>".$this->posterip()."</font> - <a href=\"javascript:whois('http://stats.kuht.it/inc/whois.php?IP=".$this->posterip()."');\">WHOIS</a></b><br />";

} else {

$ip_image = "IP: <b><font color='#FF0000'>nascosto</font></b><br />";



please don't consider whois.php, is a php page that can whois a certain ip, remove it.

for the lazy:

Quote:

if ( $adminview ) {
$ip_image = "IP: <b><font color='#FF0000'>".$this->posterip()."</font> </b><br />";

} else {

$ip_image = "IP: <b><font color='#FF0000'>nascosto</font></b><br />";

}

i've made also an algorithm to crypt the ip for non admin user, but i think that is better leaving "nascosto" (hidden or protected)



12
kain
Re: apache and /modules/news
  • 2003/6/14 22:14

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


simply great, thank you, it works.



13
kain
Re: apache and /modules/news
  • 2003/6/6 0:15

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


sorry for bumping..
I've tried the php way, but nothing, there are too many class/include to modify and I can't rewrite part of core to do this..
maybe mod_rewrite for apache can work, but I think if we write a rule that points again to document root it will results in an infinite loop (index.php <-> /modules/news/index.php).
I don't want to use frames.. nobody out there have tried to solve this problem?

ps. I use XOOPS 1.3.10



14
kain
apache and /modules/news
  • 2003/6/4 11:53

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


hi there,
my default module is news, any hint how to set up apache configuration to displayhttp://www.foo.bar insted ofhttp://www.foo.bar/modules/news ?
TIA



15
kain
Re: module-related title hack
  • 2003/4/5 1:38

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


i tried to look into postnuke codebase and in fact this hack is present only for news and forums modules, maybe we can use one or more variables that are passed with hidden fields to display their content in <title> (or instead using global variables).
i think that third party modules developers can integrate this or those variables without problem, if they want their modules support this feature; and yes, it makes easier bookmarking pages



16
kain
Re: module-related title
  • 2003/4/4 17:23

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


ok, i'll mail a developer, or if they see this topic they can respond directly here.
thanks for your points



17
kain
Re: module-related title
  • 2003/4/4 9:25

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


ok, it's done, here's how:

in mainfile.php add

$xoopsConfig['forumpage'] = 0;
$xoopsConfig['forumtitle'] = "";

after $xoopsConfig['db_pconnect'] = 1;

yes, probably isn't the best way but works for me, after this:

-------------
in /modules/newbb/viewtopic.php

take the
include(XOOPS_ROOT_PATH."/header.php"); around line 46 and port it after

$myts->makeTboxData4Show($forumdata['topic_title']);

and before add
$xoopsConfig['forumtitle'] = $forumdata['topic_title'];

so it will result:

- - - - - -
$forumdata['topic_title'] = $myts->makeTboxData4Show($forumdata['topic_title']);
$xoopsConfig['forumtitle'] = $forumdata['topic_title'];
include(XOOPS_ROOT_PATH."/header.php");
- - - - - -

around line 40 of the same file add
$xoopsConfig['forumpage'] = 1;
after
} elseif (empty($topic_id)) {
redirect_header("viewforum.php?forum=$forum",2,_MD_ERRORTOPIC);
exit();
}

so it will result

- - - - - -
} elseif (empty($topic_id)) {
redirect_header("viewforum.php?forum=$forum",2,_MD_ERRORTOPIC);
exit();
}
$xoopsConfig['forumpage'] = 1;
- - - - - -

around line 36-40

------------------------------
in /include/functions.php
find the tag <html> and the others one, replace all with
if ($xoopsConfig['forumpage'] == 1)
{

echo "<html>\n";
echo "<head>\n";
echo "<title>".$xoopsConfig['sitename']." - ".$xoopsConfig['forumtitle']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."' />\n";
echo "<meta name='author' content='".$xoopsConfig['sitename']."' />\n";
echo "<meta name='copyright' content='Copyright (c) 2002 by ".$xoopsConfig['sitename']."' />\n";
echo "<meta name='keywords' content='".$meta."' />\n";
echo "<meta name='description' content='".$xoopsConfig['slogan']."' />\n";
echo "<meta name='generator' content='".XOOPS_VERSION."' />\n\n";
//$xoopsConfig['forumpage'] = 0;

} else {

echo "<html>\n";
echo "<head>\n";
echo "<title>".$xoopsConfig['sitename']." - ".$xoopsConfig['slogan']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."' />\n";
echo "<meta name='author' content='".$xoopsConfig['sitename']."' />\n";
echo "<meta name='copyright' content='Copyright (c) 2002 by ".$xoopsConfig['sitename']."' />\n";
echo "<meta name='keywords' content='".$meta."' />\n";
echo "<meta name='description' content='".$xoopsConfig['slogan']."' />\n";
echo "<meta name='generator' content='".XOOPS_VERSION."' />\n\n";


}

so it will result

- - - - - - - -
$meta = $myts->makeTareaData4InsideQuotes($meta);


if ($xoopsConfig['forumpage'] == 1)
{

echo "<html>\n";
echo "<head>\n";
echo "<title>".$xoopsConfig['sitename']." - ".$xoopsConfig['forumtitle']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."' />\n";
echo "<meta name='author' content='".$xoopsConfig['sitename']."' />\n";
echo "<meta name='copyright' content='Copyright (c) 2002 by ".$xoopsConfig['sitename']."' />\n";
echo "<meta name='keywords' content='".$meta."' />\n";
echo "<meta name='description' content='".$xoopsConfig['slogan']."' />\n";
echo "<meta name='generator' content='".XOOPS_VERSION."' />\n\n";
//$xoopsConfig['forumpage'] = 0;

} else {

echo "<html>\n";
echo "<head>\n";
echo "<title>".$xoopsConfig['sitename']." - ".$xoopsConfig['slogan']."</title>\n";
echo "<meta http-equiv='Content-Type' content='text/html; charset="._CHARSET."' />\n";
echo "<meta name='author' content='".$xoopsConfig['sitename']."' />\n";
echo "<meta name='copyright' content='Copyright (c) 2002 by ".$xoopsConfig['sitename']."' />\n";
echo "<meta name='keywords' content='".$meta."' />\n";
echo "<meta name='description' content='".$xoopsConfig['slogan']."' />\n";
echo "<meta name='generator' content='".XOOPS_VERSION."' />\n\n";


}
include(XOOPS_ROOT_PATH."/include/xoopsjs.php");

- - - - -

around line 52-83

that's all, when you or some search engine spider visits a forum's thread you or he will see the topic title in title's page


example:
http://www.kuht.it/modules/newbb/viewtopic.php?topic_id=1443&forum=3



18
kain
module-related title hack
  • 2003/4/3 12:15

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


it would be a nice feature to add, for example, in the tag <title> the subject of the forum thread displayed.
this feature can dramatically increase visibility in search engines, like geocrawler et similia.
i'm working on this on XOOPS 1.3.9, what do you think?



19
kain
Re: IIS Install problem
  • 2002/6/6 19:24

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


which browser are you currently using?



20
kain
Re: "Sorry, you do not have the permission to access this area...."
  • 2002/6/6 17:18

  • kain

  • Just popping in

  • Posts: 56

  • Since: 2002/1/9 9


read past posts, go to admin sections -> groups -> and set permissions for your anonymous group (and registered users)




TopTop
« 1 (2) 3 »



Login

Who's Online

153 user(s) are online (96 user(s) are browsing Support Forums)


Members: 0


Guests: 153


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