Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
xiketuan
Newbie
Newbie



Joined: Nov 11, 2008
Posts: 18

PostPosted: Wed Nov 12, 2008 5:59 am Reply with quote

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.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Wed Nov 12, 2008 9:02 am Reply with quote

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.
 
View user's profile Send private message Visit poster's website
xiketuan
Newbie
Newbie



Joined: Nov 11, 2008
Posts: 18

PostPosted: Sat Nov 15, 2008 6:22 am Reply with quote

Site in SQL my _main no, then I have to reconfigure how the code change
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sat Nov 15, 2008 8:50 am Reply with quote

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&amp;op=viewcat&amp;catid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;op=viewst&amp;sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=article&amp;sid=([0-9]*)&amp;mode=([a-z]*)&amp;order=([0-9]*)&amp;thold=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=comments&amp;sid=([0-9]*)&amp;pid=([0-9]*)&amp;mode=([a-z]*)&amp;order=([0-9]*)&amp;thold=([\-0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=comments&amp;op=Reply&amp;pid=([0-9]*)&amp;sid=([0-9]*)&amp;mode=([a-z]*)&amp;order=([0-9]*)&amp;thold=([\-0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=comments&amp;op=showreply&amp;tid=([0-9]*)&amp;sid=([0-9]*)&amp;pid=([0-9]*)&amp;mode=([a-z]*)&amp;order=([0-9]*)&amp;thold=([\-0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;new_topic=([0-9]*)&amp;pagenum=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=categories&amp;op=newindex&amp;catid=([0-9]*)&amp;pagenum=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=categories&amp;op=newindex&amp;catid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=print&amp;sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=friend&amp;op=FriendSend&amp;sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=friend"',
'"(?<!/)modules.php\?name=News&amp;pagenum=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=article&amp;op=newindex&amp;catid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=article&amp;sid=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;new_topic=([0-9]*)"',
'"(?<!/)modules.php\?name=News&amp;file=comments"',
'"(?<!/)modules.php\?name=News"',
'"(?<!/)modules.php\?name=Private_Messages&amp;mode=post&amp;u=([0-9]*)"',
'"(?<!/)modules.php\?name=Search&amp;author=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Search&amp;type=comments&amp;sid=([0-9]*)"',
'"(?<!/)modules.php\?name=Search&amp;topic=([0-9]*)"',
'"(?<!/)modules.php\?name=Your_Account&amp;op=userinfo&amp;username=([a-zA-Z0-9_-]*)"',
'"(?<!/)modules.php\?name=Your_Account&amp;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]
 
View user's profile Send private message Visit poster's website
xiketuan
Newbie
Newbie



Joined: Nov 11, 2008
Posts: 18

PostPosted: Sat Nov 15, 2008 11:46 am Reply with quote

thanks montego
 
View user's profile Send private message
xiketuan
Newbie
Newbie



Joined: Nov 11, 2008
Posts: 18

PostPosted: Thu Nov 20, 2008 9:59 pm Reply with quote

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
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Fri Nov 21, 2008 7:39 am Reply with quote

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 
View user's profile Send private message Visit poster's website
xiketuan
Newbie
Newbie



Joined: Nov 11, 2008
Posts: 18

PostPosted: Sat Nov 22, 2008 12:31 am Reply with quote

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
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Sun Nov 23, 2008 9:52 am Reply with quote

That link is non-standard as it does not start with news.html. Why "tap" it? Just leave this as it is.
 
View user's profile Send private message Visit poster's website
xiketuan
Newbie
Newbie



Joined: Nov 11, 2008
Posts: 18

PostPosted: Tue Nov 25, 2008 5:51 am Reply with quote

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:
ImageImage
 
View user's profile Send private message
Guardian
Site Admin
Site Admin



Joined: Jul 18, 2005
Posts: 397

PostPosted: Tue Nov 25, 2008 7:25 am Reply with quote

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.
 
View user's profile Send private message
xiketuan
Newbie
Newbie



Joined: Nov 11, 2008
Posts: 18

PostPosted: Thu Nov 27, 2008 12:24 am Reply with quote

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.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1399

PostPosted: Thu Nov 27, 2008 8:36 am Reply with quote

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 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch