Go Back   Club Conspiracy Forums > Club Conspiracy Community > Announcements and Site News
FAQ Members List Calendar Search Today's Posts Mark Forums Read



Closed Thread
 
Thread Tools Display Modes
  #31  
Old 01-25-2008, 10:48 AM
mizfish mizfish is offline
Senior Member
 
Join Date: Jan 2008
Posts: 163
Default


hi Jimbo

the correction for the size issue was very simple. because it was a straight swap of fixed text, ie

size=x-large to size=6

there are no variables in those strings of text.

the issue with the url's. is that the following:

1 - each URL is different, so in order to fix them, i'd need to run the command for each URL.

2 - some of the URL's have http:// some have www. some dont have the www. part yet have the http:// par etc. too many variations.

3 - how to detetmin between the already tagged URL's and the untagged URL's.

4 - how to exclude all other URL's such as image url's, video clip url's etc.

its an impossible task, there are just too many variations.

susie

  #32  
Old 01-25-2008, 01:54 PM
sanjay sanjay is offline
Moderator
 
Join Date: Jan 2008
Posts: 8
Default

I like when people use flattery.
  #33  
Old 01-25-2008, 01:58 PM
sanjay sanjay is offline
Moderator
 
Join Date: Jan 2008
Posts: 8
Default

can't you just find and replace the HTML tags that identified links and replace that?

Quote:
Originally Posted by susie View Post
hi Jimbo

the correction for the size issue was very simple. because it was a straight swap of fixed text, ie

size=x-large to size=6

there are no variables in those strings of text.

the issue with the url's. is that the following:

1 - each URL is different, so in order to fix them, i'd need to run the command for each URL.

2 - some of the URL's have http:// some have www. some dont have the www. part yet have the http:// par etc. too many variations.

3 - how to detetmin between the already tagged URL's and the untagged URL's.

4 - how to exclude all other URL's such as image url's, video clip url's etc.

its an impossible task, there are just too many variations.

susie
  #34  
Old 01-25-2008, 02:57 PM
mizfish mizfish is offline
Senior Member
 
Join Date: Jan 2008
Posts: 163
Default

hi Sanjay,

the problem is there isnt any HTML tags to identify them. theyre flat text. so theres nothing to know where they are. we can find http, or www. but theres nothing to say where the end of the url ends.

eg

www.this-is-a-sample-url.com/page-name-etc

in the above text, we can identify the start of the URL, but the query wont be able to identify where it ends, unless we can give it a specific set of characters to look for.

i can tell it to look for "xyz" and swap it with "123", but because all the URL's are different, we cant specify all the variables that it "could be".
  #35  
Old 01-25-2008, 03:00 PM
mizfish mizfish is offline
Senior Member
 
Join Date: Jan 2008
Posts: 163
Default

i should add, theres nothing actually wrong with the URL's that were converted, the only issue is they arnt active links. people can just copy them and past them in their browsers.
  #36  
Old 01-25-2008, 04:05 PM
Jimbo's Avatar
Jimbo Jimbo is offline
Senior Member
 
Join Date: Nov 2004
Posts: 961
Default

Now I feel bad I opened that "can of worms"...

//
// Ignore These - So you don't need to process any of these in any way. Just leave them as is.
//
// Yes - Ignoring these embedded URL might not be so simple...

< img src="http://photo_link" height=xxx width=xxx border=2 >

< a href="http://photo_link" target="_blank">Photo Title or Name< /a >

< a href="_link_" target="_blank">_link_< /a >

< object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/__video__code"></param><param name="wmode" value="transparent"></param>< embed > < /embed ></object>

< embed> ___whatever__ </embed>

[ url ]__Link__[ /url ]

[ img ]__Link__[ /img ]

... etc., etc.,...

//
// Only Process These (Independent String Tokens) - & Ignore Everything Else
//

"http://__any__length__string__token___" ==> [ url ]http://__any__length__string__token___[ /url ]

"https://__any__length__string__token___" ==> [ url ]http://__any__length__string__token___[ /url ]

"www.__any__length__string__token___" ==> [ url ]www.__any__length__string__token___[ /url ]

//
// Summary - Simplified "C" Code Algorithm (Other Details & Complexities Omitted)
//
// NOTEs:
// 1) Tokens here are delimited by "white blank spaces" (space, newline, tabs, etc.)
// \n - newline
// \t - horizontal tab
// \v - vertical tab
// \b - backspace
// \r - carriage return
// \f - formfeed
//
// 2) URLs will become a string token as delimited by "white blank spaces".
//
// The entire single entity "token" will be the URL.
//
// This assumes that a URL will start w/ either ( http://, https://, www., or other known header), &
// it will end w/ a "white blank space".

Code:
   char string_token[1025], p[2025];
   string_token[0] =  '\0';
   p[0] =  '\0';

   while(get_next_string_token(string_token)) {            // get next token - pseudo code
      strncpy(p,string_token,1024);                        // make a copy

      if(strncmp(string_token,"http://",7) == 0) {         // if "http" URL
          tag_untagged_URL(p);                             // tag that animal
          output(p);                                       // output fixed URL
      } else if(strncmp(string_token,"https://",8) == 0) { // else if "https" URL
          tag_untagged_URL(p);                             // tag that animal
          output(p);                                       // output fixed URL
      } else if(strncmp(string_token,"www.",4) == 0) {     // else if "www." URL 
          tag_untagged_URL(p);                             // tag that animal
          output(p);                                       // output fixed URL
      } else {
         output(string_token);                             // output unprocessed string token - pseudo code
      }
   }
Reference: strncmp
http://www.cplusplus.com/reference/c...g/strncmp.html

Reference: strtok
http://www.cplusplus.com/reference/c...ng/strtok.html
__________________
Freedom is to understand, & to be unbounded by that Freedom -
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.

Last edited by Jimbo : 01-25-2008 at 04:35 PM.
  #37  
Old 01-25-2008, 05:05 PM
mizfish mizfish is offline
Senior Member
 
Join Date: Jan 2008
Posts: 163
Default

these are all fine and well. and im no coder as such, but the database is SQL, so im not entirely sure where the cplus commands will fit in.

in all honesty, is this really worth the time thats being spent on this? correct me if im wrong here, but isnt the whole point of this to change an inactive link into an active link?
  #38  
Old 01-25-2008, 05:21 PM
Jimbo's Avatar
Jimbo Jimbo is offline
Senior Member
 
Join Date: Nov 2004
Posts: 961
Default The Final Chapter

Susie,

As far as I am concerned you have already helped us plenty. And I sincerely thank you for that. I am also certain that everyone else in the CC forum is just as thankful as well.

A car is only good if it can take you somewhere.

A URL is only good if it can take you somewhere.

Democracy is only good if it can actually portray the “will” of “the people” it represents.

However, if “Sanjay” would like to take this further, & convert all “inactive URLs” into “active URLs” I am willing to help w/ my ideas. I am not knowledgeable in “databases” either & their interfaces, so I can’t help you there, but I can still think “out loud”, & so can you.

Thanks for all.
__________________
Freedom is to understand, & to be unbounded by that Freedom -
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.

Last edited by Jimbo : 01-25-2008 at 08:05 PM.
  #39  
Old 01-25-2008, 08:48 PM
Shadow's Avatar
Shadow Shadow is offline
The Shadow Knows!
 
Join Date: Aug 2006
Posts: 1,941
Default

I'm not sure if VBulletin supports "Jimbo Format" as we used to know it

I think you will have to change the "tone" of your message here.

Embeded Youtube videos should work on the other hand:

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/pZ_Z_XG0L2c&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/pZ_Z_XG0L2c&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
  #40  
Old 01-25-2008, 08:51 PM
sanjay sanjay is offline
Moderator
 
Join Date: Jan 2008
Posts: 8
Default

Let's all move on from this issue for now. Susie has to work on making this place prettier and I have to bring in more people.
Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 02:59 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.