11
BelaS
Re: FAQ problem (strange URL)
  • 2004/3/9 9:48

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Thanks again, Reynaldo. One more question: certain interstitial ad codes on my sites translate the + signs in the hacked URLs into %20, thus breaking the link. Would it damage anything in the way the hack works if I changed the + signs to - signs? And where would I change that?

Cheers,

Béla



12
BelaS
WFSection - Very long articles
  • 2004/3/5 11:09

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Hi Xoopsers,

I use WFSection on nearly all of my XOOPS sites with great success. I frequently need to post long single articles that wind up getting trimmed if I'm not careful. So far, I work around this by creating the articles in HTML and using the wrap feature, which works like a charm. However, as I am also using a handy-dandy cross-referencing hack that performs a search/replace on wfsections content on the fly - very useful for internal linking - I would like to post these directly in wf instead. The cross-reference hack doesn't work on embedded html files.

I thought that I was running into the 64K size limit of the text format maintext field, and that all I would need to do to avoid this is to change the column format of the maintext field in wfsections to one with a larger limit, presumably mediumtext. Is that guess correct, and is it possible to change the column format to mediumtext without damaging anything within wf? And if not, is there another simple way to expand that limit?

Thanks in advance,

Béla



13
BelaS
Re: FAQ problem (strange URL)
  • 2004/3/5 10:36

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Hi Reynaldo,

WFSection seems to work perfectly with the hack. The only module I've encountered trouble with so far is Glossary, and I think I've fixed that by adding a XOOPS_URL to some of the paths.

On the other question, what I was trying to do was to add one additional rule to .htaccess to strip the xoops/ out of the URL for a site that I had moved from a subdirectory into the root directory of the domain, i.e. fromhttp://www.internetadsales.com/xoops/ to just plainhttp://www.internetadsales.com. That rule, which I reproduced above, works by means of an external redirect flag on the RewriteRule. It seems to work successfully on that site (you can test by clicking the first link).

In theory, the way mod_rewrite works is to run through the list of rules in the order in which they are listed in .htaccess, so the requested URL should first get xoops/ stripped out of it, then the resulting URL should be modified by the changes applied in your hack.

However, in my frenzy of testing the only way that the initial rule seemed to work properly was by having both R and L flags applied to it. The R flag forces an external redirect, and the L flag, as I understand it, causes .htaccess to stop making changes to the URL when it is reached.

So, I was just wondering if you (and don't try to fool me with this "I'm no guru" stuff) knew of another way to strip the xoops/ out of the requested URL that would not require an L and R flag, and that would allow processing to continue through the changes applied by your hack?

I just reread this and realized I'm not quite sure what I'm looking for. Here's an attempt at an example:

Suppose Google has spidered an article in WFSection. The link on which the user would click is as follows:

http://www.internetadsales.com/xoops/modules/wfsection/article.php?articleid=13

When they get to the site, the rewrite rule I added removes the XOOPS from the URL, placing the user here:

http://www.internetadsales.com/modules/wfsection/article.php?articleid=13

which is the correct current location of wfsection. Users navigating internally, however, wind up at this URL:

http://www.internetadsales.com/m-wfsection+article+articleid-13.html

which is, of course, functionally identical. I think what I'm looking for is a way to make sure that a user clicking on the first URL doesn't wind up with the second one displayed in the address bar, but the third. In other words, that users are presented with the same URL whether they navigate to the page externally or internally. I don't suppose it matters that much, but it would make for a cleaner site and potentially improved search engine placements in the long run.

I'm not sure if that's any clearer. I find this whole business confusing, but I'm delighted that your hack seems to be working so well.

Cheers,

Béla



14
BelaS
Re: FAQ problem (strange URL)
  • 2004/3/4 19:39

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Another thing. I'm well over my head, here, but in the spirit of adventure and in order to implement your hack I decided to drag one of my XOOPS sites out of the xoops/ subfolder, into which it had been foolishly installed, and place it at the site root. The path issues were mostly corrected by editing xoops/ out of mainfile.php, but I still had the issue of lots of pages that had already been spidered by Google and others, as well as hard-coded internal links, resulting in 404 errors. So I groped around apache.org a bit and added another rewrite rule to .htaccess, as follows:

RewriteRule ^xoops/(.*) http // www . internetadsales . com/$1 [L,R]

(spaces added to keep textsanitizer at bay)

The external redirect and the L command seemed to be the only way I could get it to work. So now a user clicking a URL such as:
http://www.internetadsales.com/xoops/modules/wfsection/article.php?articleid=13

will happily arrive at the correct page with the xoops/ stripped out, even though the xoops/ directory no longer exists on the server.

What I could not achieve was to find a solution that would allow your rewrite rules to go ahead and work their magic on the result of the xoops/ stripping rule, which is placed immediately before yours in .htaccess. I imagine this is due to the use of the external redirect, but other options seemed to confuse Xoops. Is there a better solution to the initial problem that would allow the subsequent rewrite rules to work as well?

This is my first stab at poking around mod_rewrite, so please pardon what may be a foolish question.

Thanks,

Béla



15
BelaS
Re: FAQ problem (strange URL)
  • 2004/3/4 15:19

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Quote:

reynaldo wrote:
Béla:

You can download ver 0.4 and then overwrite with fix #6. Please take in consideration you have to use both #6 files, xoops_shorturls.txt6 and loadpage.txt6

If you have any problems, let me know.


Thanks, Reynaldo. That's precisely what I did (I think) a few hours ago and the hack appears to be working very well. I've installed it on three production sites so far. One or two small hiccups which I'll pass on when I have a clearer idea as to what is happening.

Béla



16
BelaS
Re: FAQ problem (strange URL)
  • 2004/3/3 13:15

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


I've been following this long and illuminating thread and would like to download and test the hack. Is your recommendation, reynaldo, that one download the latest full version you posted about 6 pages ago and patch with Hot Fix #6, or is the patch included in the full version, or should the latest patch be avoided for another few hours despite the fact that it sounds as though it works like a charm?

My compliments on your tenacity and attention to detail. And I agree that this hack should become core when all the details have been ironed out.

Thanks,

Béla



17
BelaS
Re: Custom universal code snippet
  • 2004/2/18 12:59

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Moments after posting this I had the good fortune to stumble upon the "editorExtension" hack, which looks as though it will do the trick. Has anyone tried this?



18
BelaS
Custom universal code snippet
  • 2004/2/18 12:55

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Hi Xoopsers,

I've been wracking my brain trying to figure out where and how I could create a feature that would allow me to drop a little custom tag into the body of the text of a News or WFSection article. The tag would convert when loaded to display whatever the content of the tag is set as (in this case, javascript for a floating ad banner, but it could be a recurring pullout-headline or something of the kind).

My thinking was that I would define the code to be contained in the tag as a function somewhere, then insert is thusly:

In, for example, an article in News:

Text text text [myTagtext text text


and XOOPS would automagically convert [myTag] into a nifty pullout box or what-have-you.

I imagine this could be defined in the same spot as the [ URL ] and other formatting codes, but I can't find them and am unsure whether it would work in that manner.

Any assistance would be greatly appreciated.

Béla



19
BelaS
AllAmericanPatriots.com
  • 2004/2/8 12:50

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26





20
BelaS
Re: WF-Sections v2 Preview
  • 2004/1/31 14:13

  • BelaS

  • Just popping in

  • Posts: 62

  • Since: 2003/5/26


Hi Catzwolf,

I'm a big fan of WFSections and glad to hear that progress is being made on the latest greatest version.

This may be the wrong place to post this, but I don't have time to root around at the moment so I shall proceed nonetheless. One bit of code I have to tweak on all versions of WFSections I run is the default order by articleid ASC to articleid DESC in this chunk

if (isset($HTTP_GET_VARS['orderby'])) {
    
$orderby convertorderbyin($HTTP_GET_VARS['orderby']);
} else {
    
$orderby "articleid DESC";
}


of allarticles.php, as I have lots and lots of articles and most often need to review and correct the most recently posted rather than the old ones gathering dust at the top of the screen. Have you, by any chance, changed that in the new version? If not, couldja please? Or perhaps add a default option to the configuration settings?

Looking forward with bated breath to the release.

All the best,

Bela




TopTop
« 1 (2) 3 4 »



Login

Who's Online

229 user(s) are online (134 user(s) are browsing Support Forums)


Members: 0


Guests: 229


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