The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I have links and Downloads Manager installed. In 1100 entries in there are dead links in the description field, due to copy -pasting of text.
I need to remove all links from the that description field, so that only plain text remains in that field. The database table is vb_linkslink and the field is linkdesc Links look like this: Code:
[url="http://www.somesite.com/entrez?Db=pubmed&Cmd=Search&Term=%22Guo%20Y%22%5BAuthor%5D&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_RVAbstractPlus"][color=black]Some author name[/color][/url] Does anyone know what query I could use to do this? |
#2
|
||||
|
||||
![]()
I don't think a query would work on something like this. You'll need a custom script and need to use some sort of regular expression to find matches and remove them.
|
#3
|
||||
|
||||
![]() PHP Code:
PHP Code:
|
#4
|
||||
|
||||
![]()
Where should that code go to execute it?
|
#5
|
|||
|
|||
![]()
For things like that I usually create a plugin using hook misc_start and code like this:
PHP Code:
then go to page misc.php?do=fixlinks to run it, and disable or delete it when I'm done. |
#6
|
||||
|
||||
![]()
New PHP file works too...
PHP Code:
|
#7
|
|||
|
|||
![]() Nice, that is pretty simple. ![]() |
#8
|
||||
|
||||
![]()
Nope, those are the only two required lines (error_reporting, require global.php)
![]() The rest are good practice but don't matter for quick one-off scripts. |
#9
|
||||
|
||||
![]()
Unfortunately that didnt work as planned.
Instead of hotlinked words, I now have this: Code:
Eur J Pharmacol. (javascript:AL_get(this, 'jour', 'Eur J Pharmacol.')); 1998 Jan 12;341(2-3):131-4 Schultz DM (http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22Schultz%20DM%22%5BAuthor%5D&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_RVAbstractPlus), Prescher JA (http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22Prescher%20JA%22%5BAuthor%5D&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_RVAbstractPlus), Kidd S (http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22Kidd%20S%22%5BAuthor%5D&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_RVAbstractPlus), Marona-Lewicka D (http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22Marona-Lewicka%20D%22%5BAuthor%5D&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_RVAbstractPlus), Nichols DE (http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22Nichols%20DE%22%5BAuthor%5D&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_RVAbstractPlus), Monte A (http://www.ncbi.nlm.nih.gov/sites/entrez?Db=pubmed&Cmd=Search&Term=%22Monte%20A%22%5BAuthor%5D&itool=EntrezSystem2.PEntrez.Pubmed.Pubmed_ResultsPanel.Pubmed_DiscoveryPanel.Pubmed_RVAbstractPlus) Code:
Eur J Pharmacol. 1998 Jan 12;341(2-3):131-4 Schultz DM, Prescher JA, Kidd S, Marona-Lewicka D, Nichols DE, Monte A |
#10
|
||||
|
||||
![]()
I'd revert it for now, yeah.
If you want to send me a few example rows (10-50 or so) I can get it working for you, but will be difficult without any real data. --------------- Added [DATE]1309800396[/DATE] at [TIME]1309800396[/TIME] --------------- If you want, try it again, and set $showlinks to false (4th argument to strip_bbcode). That should do the trick. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|