| Author |
Message |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Wed Nov 12, 2008 5:59 am |
|
i use url for web :
view cat :
| Code: |
modules.php?name=News&op=viewcat&catid=2
|
view arctitle :
| Code: |
| modules.php?name=News&op=viewst&sid=20 |
convert use shortlink ??? help me. |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Wed Nov 12, 2008 9:02 am |
|
You must be using a different News module as these are not valid standard news links as far as I can tell. These should be very easy to tap just using all the examples that are already in the GT-News.php script and the .htaccess rules for News?
The most important thing to keep in mind is to place any NEW modules?name=News type taps above these lines:
$urlin
'"(?<!/)modules.php\?name=News"',
$urlout
'news.html',
Otherwise, your taps will not work. In addition, the added $urlin and $urlout lines must be the exact same positions (i.e., the number of lines down from the top). The same also applies in the .htaccess in the RewriteRule lines.
Just take the numerous other examples to tap these. |
| |
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Sat Nov 15, 2008 6:22 am |
|
Site in SQL my _main no, then I have to reconfigure how the code change |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Sat Nov 15, 2008 8:50 am |
|
Sorry, but I have no idea what you just said. It looks to me like you are using a different News module and I am not going to tap any more for you as you need to learn how to do this yourself. There are so many examples already given in these files that you should be able to figure out the pattern.
But, just this once, here is what you should replace:
=== OPEN FILE ===
ShortLinks/GT-News.php
=== REPLACE WITH ===
Replace JUST the $urlin/$urlout lines:
| Code: |
$urlin = array(
'"(?<!/)modules.php\?name=News&op=viewcat&catid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&op=viewst&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=article&sid=([0-9]*)&mode=([a-z]*)&order=([0-9]*)&thold=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=comments&sid=([0-9]*)&pid=([0-9]*)&mode=([a-z]*)&order=([0-9]*)&thold=([\-0-9]*)"',
'"(?<!/)modules.php\?name=News&file=comments&op=Reply&pid=([0-9]*)&sid=([0-9]*)&mode=([a-z]*)&order=([0-9]*)&thold=([\-0-9]*)"',
'"(?<!/)modules.php\?name=News&file=comments&op=showreply&tid=([0-9]*)&sid=([0-9]*)&pid=([0-9]*)&mode=([a-z]*)&order=([0-9]*)&thold=([\-0-9]*)"',
'"(?<!/)modules.php\?name=News&new_topic=([0-9]*)&pagenum=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=categories&op=newindex&catid=([0-9]*)&pagenum=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=categories&op=newindex&catid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=print&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=friend&op=FriendSend&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=friend"',
'"(?<!/)modules.php\?name=News&pagenum=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=article&op=newindex&catid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=article&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&new_topic=([0-9]*)"',
'"(?<!/)modules.php\?name=News&file=comments"',
'"(?<!/)modules.php\?name=News"',
'"(?<!/)modules.php\?name=Private_Messages&mode=post&u=([0-9]*)"',
'"(?<!/)modules.php\?name=Search&author=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Search&type=comments&sid=([0-9]*)"',
'"(?<!/)modules.php\?name=Search&topic=([0-9]*)"',
'"(?<!/)modules.php\?name=Your_Account&op=userinfo&username=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Your_Account&op=([a-z_]*)"',
'"(?<!/)modules.php\?name=Topics"'
);
$urlout = array(
'article-viewcat-\\1.html',
'article-viewst-\\1.html',
'article-\\1-\\2-\\3-\\4.html',
'article-comments-\\1-\\2.html',
'article-reply-\\1-\\2.html',
'article-showreply-\\1-\\2-\\3.html',
'article-topic\\1-page\\2.html',
'article-category\\1-page\\2.html',
'article-category-\\1.html',
'article-print-\\1.html',
'article-friend-\\1.html',
'article-friend.html',
'article-page-\\1.html',
'article-cat-\\1.html',
'article\\1.html',
'article-topic-\\1.html',
'article-comments.html',
'news.html',
'messages-post-\\1.html',
'search-author-\\1.html',
'search-comments-\\1.html',
'search-\\1.html',
'userinfo-\\1.html',
'account-\\1.html',
'topics.html'
);
|
=== OPEN FILE ===
.htaccess
=== REPLACE ===
Replace exisiting #Articles (News) lines with these:
| Code: |
RewriteRule ^article-viewcat-([0-9]*).html modules.php?name=News&op=viewcat&catid=$1 [L]
RewriteRule ^article-viewst-([0-9]*).html modules.php?name=News&op=viewst&sid=$1 [L]
RewriteRule ^article-([0-9]*)-([a-z]*)-([0-9]*)-([0-9]*).html modules.php?name=News&file=article&sid=$1&mode=$2&order=$3&thold=$4 [L]
RewriteRule ^article-comments-([0-9]*)-([0-9]*).html modules.php?name=News&file=comments&sid=$1&pid=$2 [L]
RewriteRule ^article-reply-([0-9]*)-([0-9]*).html modules.php?name=News&file=comments&op=Reply&pid=$1&sid=$2 [L]
RewriteRule ^article-showreply-([0-9]*)-([0-9]*)-([0-9]*).html modules.php?name=News&file=comments&op=showreply&tid=$1&sid=$2&pid=$3 [L]
RewriteRule ^article-([0-9-]*)-([a-z]*)-([0-9]*)-([0-9]*).html([0-9#]*) modules.php?name=News&file=article&thold=$1&mode=$2&order=$3&sid=$4$5 [L]
RewriteRule ^article-topic([0-9]*)-page([0-9]*).html modules.php?name=News&new_topic=$1&pagenum=$2 [L]
RewriteRule ^article-category([0-9]*)-page([0-9]*).html modules.php?name=News&file=categories&op=newindex&catid=$1&pagenum=$2 [L]
RewriteRule ^article-category-([0-9]*).html modules.php?name=News&file=categories&op=newindex&catid=$1 [L]
RewriteRule ^article-print-([0-9]*).html modules.php?name=News&file=print&sid=$1 [L]
RewriteRule ^article-friend-([0-9]*).html modules.php?name=News&file=friend&op=FriendSend&sid=$1 [L]
RewriteRule ^article-friend.html modules.php?name=News&file=friend [L]
RewriteRule ^article-page-([0-9]*).html modules.php?name=News&pagenum=$1 [L]
RewriteRule ^article([1-9][0-9]*).* modules.php?name=News&file=article&sid=$1 [L]
RewriteRule ^article-topic-([0-9]*).html modules.php?name=News&new_topic=$1 [L]
RewriteRule ^article-comments.html modules.php?name=News&file=comments [L]
RewriteRule ^allnews.html modules.php?name=News&file=allindex [L]
RewriteRule ^news.html news.html [L]
|
|
| |
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Sat Nov 15, 2008 11:46 am |
|
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Thu Nov 20, 2008 9:59 pm |
|
modules News I have more files with tabcont.php structure follows:
| Code: |
| modules / News / tabconte.php? tabdetail op = & id = catid |
so when I used the code shortlinks how, please admin guide somewhat. thanks |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Fri Nov 21, 2008 7:39 am |
|
We need to see the actual link. That is not a link that you have posted. Please copy the link and paste it here and we'll see what we can do. |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Sat Nov 22, 2008 12:31 am |
|
I use this code ajax applications from the tabcontent dynamicdrive. get used to each News of the cat, the cat should be taken only in management Admin. config tabconte part of my query this database does not directly config.php. tabconte.php files in the modules News
| Code: |
| <a href='modules/News/tabconte.php?op=tabdetail&id=".$row['catid']."' rel=\"ajaxcontentarea\">".$row['title']."</a> |
demo homepage : www.tanhlinh.com
i am vietnam |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Sun Nov 23, 2008 9:52 am |
|
That link is non-standard as it does not start with news.html. Why "tap" it? Just leave this as it is. |
| |
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Tue Nov 25, 2008 5:51 am |
|
tabcontent for use for the site flexible and more shortened, can code modules in the News 1 function used to get from the tabcontent catid, but I'm not the strongest of the code, admin has been little guidance ko?
link down tabcontent : http://dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm
demo tab used like this:
  |
| |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 383
|
Posted:
Tue Nov 25, 2008 7:25 am |
|
You should think about paying someone to develop this for you as it is a custom solution you are needing.
The problem is that you cannot strip 'tabcontent' out of the URL because that will cause the ajax to fail because it uses the link REL attribute of 'tabcontent'.
You really need to recode the News module to use a DIV class for the data, then you can use that DIV to make the ajaxtabs work. |
| |
|
|
 |
xiketuan
Newbie


Joined: Nov 11, 2008
Posts: 18
|
Posted:
Thu Nov 27, 2008 12:24 am |
|
I write them in the files of the modules index.php News 1 function example: tabdetail ($ catid), and in this function are called structural information obtained as follows: modules.php? Name = News & file = Article & sid = $ sid, and in GT -News.php more modules.php? Nme = News & op = tabdetail & catid == ([0-9 ]*)"'
Theme are inserted in the files using tabcontent, then rewrite tab in effect, but the links in sid tab can not rewrite the URL.
and up. htaccess. has directed decorum.
still shows: modules.php? name = News & file = Article & sid = 6, not to be noi-dung-tin/6.html but the tab tab/1.html
please help. |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 1294
|
Posted:
Thu Nov 27, 2008 8:36 am |
|
xiketuan,
I am sorry, but you are asking for me to write custom taps. I just don't have that kind of time. Your News module is custom, therefore you are going to have to learn how to tap these yourself (and there are already plenty of examples in the current GT-News.php file to show you how). |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
|
|