News:

Wondering if this will always be free?  See why free is better.

Main Menu

Guest WebSite

Started by SAFAD, September 08, 2009, 01:38:29 PM

Previous topic - Next topic

SAFAD

Hi All
How R u ?
OK
I Made A New Field Called Website
Shows Only To Guests
So
I Wan't When The Guest Post His Site
It Been Saved TO DB
But Where ?
Best Regards
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

You mean a board that only guests can post to/only guests can see?

SAFAD

No
I Mean
Like BLOG
The Guests Can Post Theire Website
After They Post Theire Name Has The Link To Their Website
The Question Is Where To Store Their Websites ?
Best Regards
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

I have no idea what you're trying to achieve.

Guests posting website details = ripe for spammers.

SAFAD

Didn't Get What Am Saying ?
I Wana Guests Post Their Website
And Their Names Turn To A Link To Their Website
And Spammers Won't Do Anything With My Questions :)
Best Regards
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

babjusi

Quote from: SAFAD on September 08, 2009, 03:07:29 PM
Didn't Get What Am Saying ?
I Wana Guests Post Their Website
And Their Names Turn To A Link To Their Website
And Spammers Won't Do Anything With My Questions :)
Best Regards

I didn''t get what you are saying either and I doubt that anyone else will. Use a google translator, it will help you express yourself better.

SAFAD

LOL
Don't You Know Blogs ?
OK
1 By 1
In My Forum Guests Can Post
I Wan't The Guests Post Their Website
Thats Only
What The Difficult On This ?
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

So you want them to post their website.

In that case make a board that guests can post in. I don't see how the reference to a blog is going to help you - a blog is a place where people post their own articles/thoughts, not just links to other places.

SAFAD

No Bro Not Like This

Its Just An Example
My Trafic is Very Lame
He Wants Everything To Himself
so I Let Them get Backlink With Dofollow Rel
Any Idea ?
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

So you're wanting to allow people to post live links without authentication of who they are?

SAFAD

Nah Not Like That
http://safadsoft.com/bb/index.php?topic=1327.0
Go TO The Last Of The Page (Sorry For Arabic)
You Will Find 4 Boxs
1st-Guest Name
2nd-Website (My Url By Default)
3rd-email
4th-quickreply Box
You Won't Be Able To Post Only If You Know Arabic (Cuz My AntiBot Has An Arabic Question xD)
wan't i wan't to do
is to save the 2nd box values (website values) in DB
then In The Poster Info
It Shows That Link
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

If that generates a new topic, there is nowhere in the messages table to put the link, except in the body or title of the new message. Meaning you'll have to modify it to add a column for it.

SAFAD

Argh
Thats What i was Afraid From
hmmmm
And The MySQL Code

Inster Into

Can I Make It A V Context variable ?

$context
['posterwebsite']

and what a file should i put it on ?
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

You could make it into a $context variable - but it'll only exist for the time of that page. Nearly every single $context variable is made from a database query.

As for where, Subs-Post.php seems logical to me, to save it when the post is saved.

SAFAD

Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

SAFAD


	
$smcFunc['db_insert']('',
	
	
'{db_prefix}messages',
	
	
array(
	
	
	
'id_board' => 'int''id_topic' => 'int''id_member' => 'int''subject' => 'string-255''body' => (!empty($modSettings['max_messageLength']) && $modSettings['max_messageLength'] > 65534 'string-' $modSettings['max_messageLength'] : 'string-65534'),
	
	
	
'poster_name' => 'string-255''poster_email' => 'string-255''poster_time' => 'int''poster_ip' => 'string-255',
	
	
	
'smileys_enabled' => 'int''modified_name' => 'string''icon' => 'string-16''approved' => 'int',
	
	
),
	
	
array(
	
	
	
$topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'], $msgOptions['body'],
	
	
	
$posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
	
	
	
$msgOptions['smileys_enabled'] ? 0''$msgOptions['icon'], $msgOptions['approved'],
	
	
),
	
	
array(
'id_msg')
	
);

I Don't See Any Variables Here
How To Insert "Website" values ??
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

That's because as I already told you there isn't anywhere in the messages table to put it:

Quote from: Arantor on September 08, 2009, 04:20:29 PM
...generates a new topic, there is nowhere in the messages table to put the link, except in the body or title of the new message. Meaning you'll have to modify it to add a column for it.

So you'll have to add a new column and be careful about how you modify the update/insert queries.

SAFAD

I Added The Clomun
Now Am @ The Insert Query Stuff
what i ment
i see only array
where to put the website thing
PS:Website clomun is "poster_website"
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Arantor

You add the column into that array.

In 2.0 it's abstracted into the $smcFunc functions, meaning you have to add it into that array.

Try:
$smcFunc['db_insert']('',
'{db_prefix}messages',
array(
'id_board' => 'int', 'id_topic' => 'int', 'id_member' => 'int', 'subject' => 'string-255', 'body' => (!empty($modSettings['max_messageLength']) && $modSettings['max_messageLength'] > 65534 ? 'string-' . $modSettings['max_messageLength'] : 'string-65534'),
'poster_name' => 'string-255', 'poster_email' => 'string-255', 'poster_time' => 'int', 'poster_ip' => 'string-255',
'smileys_enabled' => 'int', 'modified_name' => 'string', 'icon' => 'string-16', 'approved' => 'int', 'poster_website' => 'string-65534',
),
array(
$topicOptions['board'], $topicOptions['id'], $posterOptions['id'], $msgOptions['subject'], $msgOptions['body'],
$posterOptions['name'], $posterOptions['email'], time(), $posterOptions['ip'],
$msgOptions['smileys_enabled'] ? 1 : 0, '', $msgOptions['icon'], $msgOptions['approved'], $website,
),
array('id_msg')
);


Where $website is the website address. I'm assuming you made the column a text column, rather than a varchar here.

SAFAD

Yea Yea
Thx
And Absolutely I Must Secure It
Thx
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Advertisement: