Unusual Request

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
TRPN
Registered User
Posts: 15
Joined: Mon Dec 10, 2001 10:37 am
Location: Oklahoma City
Contact:

Post by TRPN »

absinthe wrote: Well, I can't speak for them, but I would guess no... At least not your christmas list. The feature list for 2.0 is locked (and has been for some time) I bet they would consider it for 2.2 though... or at least listen ;)

I know that google can find urls with the query string at the end, although I think some of the other engines, like AV, have trouble with this.

Check out google's mad skeelz:
http://www.google.com/search?q=view+topic


I totally agree with you that Google can find url's with query strings. As a matter of fact google can also read pdf, word, excel, adobe postscripts, powerpoint and rich text format too. Along with Google, Altavista and Fast are also well known search engiens that will crawl urls with query strings.

However, if there where 2 similer pages but one with a plain url and other with query string in the url, the first one will have better chance to get ranked.

I will eagerly wait for the realease of PHPBB2 with this feature [if Dev teams plans to include it]

:p Vishal Thakkar :p

P.S.. Just a side note, pages with .htm and .html stands better chance compared to .shtml and lot lot lot better chance when compared to all other formats. [.asp, .cfm. phtml, .pl, .php, with query string and any other]
Search Engine Positioning @ TopRankPosition.com

User avatar
psoTFX
Former Team Member
Posts: 7425
Joined: Tue Jul 03, 2001 8:50 pm

Post by psoTFX »

We don't plan to include it ... certainly not in 2.0 (it's effectively feature frozen). It's not currently on the list for 2.2 either (and to be honest this is something I see as a mod rather than a built-in feature).

Kanuck
Former Team Member
Posts: 2791
Joined: Thu Jul 05, 2001 9:33 pm
Location: Toronto, Ontario

Post by Kanuck »

The Black Pit wrote: In my opinion, something like that should be a hack if it is anything at all. The devs are already working flat out to make this board, and in my opinion they probably don't have the time to make a different version for the, in my opinion ,minority of people who not only have root access to their server, but also feel they "need" their forums to have this feature. In my opinion.

Heh, kanuck, consider that catchphrase officially nicked. ;) Well, in my opinion it is nicked. :P

Well, I'm no longer at a loss to explain how your post count rocketed past mine so quickly... :p
Kanuck
Former phpBB.com team member

User avatar
paulca
Registered User
Posts: 53
Joined: Fri Sep 07, 2001 7:57 pm
Location: Dublin
Contact:

hack for these urls...

Post by paulca »

It's not too hard to make a hack to create pages ...
  • Every time a new forum is created, create a new directory in the phpbb root directory with the name of the forum
  • Every time a new topic is posted, create a new .php file containing the variables for that post, and an include calling viewtopic.php.

    Code: Select all

    [b]eg[/b]
    $t=3344;
    include $phpbb_root.'/viewtopic.php';
    
  • This file would be stored in the folder of its respective forum. It could be given a created name based on its title, or simply be the number of the post
  • The phpbb_forums and phpbb_posts tables would have a new field with a relative directory locator, eg '/phpbb2chat/3344.php'
  • The index pages would simply link to this locator, instead of viewforum.php or viewtopic.php, and any extra GET variables could be appended to the directory URLs
I reckon this would be a lot cleaner and much more browseable ... and it's not too difficult to implement. The problem however is that it creates some more overhead when making posts, and it uses up a lot more webspace. As such, the option to turn this as a feature on and off would need to be implemented, creating far more hassle than it's worth and ultimately slowing things down.

Which is why it should only be a mod.

Anyone up for making it once 2 is released?

hsim
Registered User
Posts: 1554
Joined: Tue Oct 23, 2001 9:39 pm
Contact:

Post by hsim »

There is a much more simple way of achieving your goal.
This is my hack prototype:

in sessions.php change

Code: Select all

return($url);
to

Code: Select all

return('/phpBB2/'.strtr($url,array("?"=>"/","&"=>"/","&"=>"/","="=>"/"))."/phpbb.html");
(replace /phpBB2/ with the absolute path to your phpBB2 because the use of / will cause major relative path problems. Also note that you'll have to edit your styles to point to the absolute path to the images)

in common.php, after

Code: Select all

set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
add:

Code: Select all

include($phpbb_root_path . 'includes/patharg.php');
create a new file includes/patharg.php containing

Code: Select all

<?php
 if(
  isset($PATH_INFO)
  )
 {
   $patharg = array();
   $patharg = explode("/",$PATH_INFO);
   if(
    $patharg[0]==''
     &&
    array_pop($patharg)=='phpbb.html'
    )
   {
     $num_param = count($patharg);
     if($num_param % 2 == 0)
     {
       $patharg[] = '';
       $num_param++;
     }
     for(
      $i = 1;
      $i < $num_param;
      $i += 2
      )
     {
       $HTTP_GET_VARS[$patharg[$i]] = addslashes($patharg[$i+1]);
     }
   }
 }
?>
The URI will look like http://www.yo-ur-si-te.com/phpBB2/viewt ... phpbb.html
email me: hsim at gmx.li

User avatar
Dzien Dobry
Registered User
Posts: 614
Joined: Thu Nov 08, 2001 3:55 pm

hack for these urls...

Post by Dzien Dobry »

I’m pleased to see that php programmers are discussing the best and easiest method of transforming regular php pages into standard htm/html pages with the shortest possible urls.

nathanaw
Registered User
Posts: 31
Joined: Sat Aug 18, 2001 9:26 am
Location: Lethbridge, Alberta, Canada
Contact:

Post by nathanaw »

afaik they do not plan to make it into html files but keep the php files, just change them. Make it so that the ? would be a / and = would also be a /... but other than that most things would be the same

this is what i am gathering from the information i have read here and on a website that was posted in this topic

User avatar
psoTFX
Former Team Member
Posts: 7425
Joined: Tue Jul 03, 2001 8:50 pm

hack for these urls...

Post by psoTFX »

Dzien Dobry wrote: I’m pleased to see that php programmers are discussing the best and easiest method of transforming regular php pages into standard htm/html pages with the shortest possible urls.

We're not ... see my post above :)

hsim
Registered User
Posts: 1554
Joined: Tue Oct 23, 2001 9:39 pm
Contact:

Post by hsim »

well if you want to you can try and use the hack I've posted :)
email me: hsim at gmx.li

TRPN
Registered User
Posts: 15
Joined: Mon Dec 10, 2001 10:37 am
Location: Oklahoma City
Contact:

Post by TRPN »

hsim wrote: well if you want to you can try and use the hack I've posted :)


I did what you said and guess what ???????

You are 100% right. It works !!!!!

But like many other things there is a small error ! :(

Visit http://topfreelancers.com/ and this should tell you the error.

Thank you and looking forward to hear from you.

:p Vishal Thakkar :p
Search Engine Positioning @ TopRankPosition.com

hsim
Registered User
Posts: 1554
Joined: Tue Oct 23, 2001 9:39 pm
Contact:

Post by hsim »

Make sure there are no spaces or linebreaks in patharg.php before or after the <? ?>
email me: hsim at gmx.li

User avatar
Sinjon
Registered User
Posts: 14
Joined: Wed Oct 17, 2001 7:19 am
Location: computer desk
Contact:

Post by Sinjon »

hmm... looks like that could work, but I think you're gonna need to change some other stuff too, hsim.

hsim
Registered User
Posts: 1554
Joined: Tue Oct 23, 2001 9:39 pm
Contact:

Post by hsim »

what d'you think still needs to be changed?
btw: don't forget to make sure you're using absolute paths. (mentioned it above)
email me: hsim at gmx.li

User avatar
Sinjon
Registered User
Posts: 14
Joined: Wed Oct 17, 2001 7:19 am
Location: computer desk
Contact:

Post by Sinjon »

Seems I jumped the gun earlier... I thought append_sid() did something to $url other than what it does. :)

Good job hsim... that is going to end up being a popular hack I believe. :)

User avatar
Sinjon
Registered User
Posts: 14
Joined: Wed Oct 17, 2001 7:19 am
Location: computer desk
Contact:

Post by Sinjon »

Would it be possible to make it so that the URL was

http://topfreelancers.com/viewforum.php/f/5.html

as opposed to

http://topfreelancers.com/viewforum.php/f/5/phpbb.html

:?:


This would shorten the URL (obviously) and also keep from having phpbb.html always stuck on the end...

Just an idea :)

Locked

Return to “2.0.x Support Forum”